Message 1 of 3
Object Oriented Programing: Include a rollout as a member?

Not applicable
04-10-2008
04:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Try this one:
well, it's all fine till you press the botton "apply".
I"m trying to make the UI defination as part of the object, is that possible?
(In fact, I've already solved this case in another way: I create a rollout outside the struct defination and a initiallizePanel( ) inside.)
struct trafficLine
(
name = "the name of the type",
info = "some describ",
image = "a preview image path",
width = 0.15,
length = 4.0,
spacing = 2.0,
guideLine = #(),
Poly = #(),
fn makePoly =
(
if isValidNode poly and poly != undefined do delete poly
tempPart = plane width:width length:length
Poly = MakeStripPoly guideLine tempPart spacing 0.5 off --To make the test work, this line may be replaced by "poly = plane( )".
delete TempPart
poly
),
fn resetGuideline =
(
guideLine = undefined
),
fn resetPoly =
(
poly = undefined
),
panel = rollout panel name
(
button apply "apply"
on apply pressed do makePoly()
),
fn makePanel =
(
try destroyDialog panel catch()
createdialog panel
)
)
a = trafficLine ()
a.guideline = circle()
a.makePanel()
well, it's all fine till you press the botton "apply".
I"m trying to make the UI defination as part of the object, is that possible?
(In fact, I've already solved this case in another way: I create a rollout outside the struct defination and a initiallizePanel( ) inside.)