You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(72) |
Jun
(97) |
Jul
(194) |
Aug
(209) |
Sep
(57) |
Oct
(119) |
Nov
(58) |
Dec
(186) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(227) |
Feb
(209) |
Mar
(90) |
Apr
(46) |
May
(20) |
Jun
(114) |
Jul
(25) |
Aug
(41) |
Sep
(42) |
Oct
(14) |
Nov
(1) |
Dec
|
2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: thomas m. <tho...@gm...> - 2006-08-31 09:03:04
|
Helo all, I've been finding myself trying to use the size of a symbol representation before its being drawn, like if I want to use setAlignment on it : ---- var rect:NSRect = new NSRect(30,100,200,200); var img:NSImage = (new NSImage()).init(); var rep:ASSymbolImageRep = new ASSymbolImageRep("logo_sm"); img.addRepresentation(rep); var iv:NSImageView = new NSImageView(); iv.initWithFrame(new NSRect(0,0,300,300)); iv.setImage(img); iv.setImageAlignment(NSImageAlignment.NSImageAlignTopRight); win.contentView().addSubview(iv); ---- since it seem the repSizeForClip method is only called when the rep is drawn it was not working (the scaledImageFrameForRect of the NSImageCell class would not get a size for the NSImage) so I extended ASSymbolImageRep to have the constructor of the child class look lihe this : --- public function SMSymbolImageRep(symbolName : String, size : NSSize) { super(symbolName, size); var size_mc:MovieClip = _root.createEmptyMovieClip("__SIZEMC__",_root.getNextHighestDepth()); if(m_size == undefined) { m_size = repSizeForClip(size_mc); } size_mc.removeMovieClip(); } --- it's working for me so I'm happy :) but I was wondering if woud not be a useful addition to the ASSymbolImageRep class, and if not then why ? Thanks in advance thomas |
From: thomas m. <tho...@gm...> - 2006-08-30 23:32:02
|
Hello all, i'm having trouble rotating views ... is there anything I should be aware of ? using rotateByAngle(90) results in my view disappearing alltogether trying to use mcBoundsHolder._rotation does the same hope i'l just mising something :) tia thomas -- |
From: Scott H. <sc...@af...> - 2006-08-27 20:01:47
|
Nice! Thanks for helping me out with this. ASMovieControllerView should be done soon if you're interested. It's looking much nicer. Scott On 27/08/06, Ewan McDougall <mr...@mr...> wrote: > Hello, > > The 'decompression' artifacts were caused by the video being played > before it had finished initialising. Now I start the movie after it > has finished initialising using a notification. > > However this shows up a bug in the changes made to NSMovieView.as , > please see the fix > > Cheers, > > Ewan > > > > > > On 27 Aug 2006, at 00:52, Scott Hyndman wrote: > > > I'll update it and take a look tomorrow when I get home. > > > > Thanks, > > Scott > > > > On 26/08/06, Ewan McDougall <mr...@mr...> wrote: > >> Hello, > >> > >> I've updated the NSMovieView.as > >> > >> Looping playback works and the correct aspect ratio of the movie is > >> maintained. > >> Could somebody check it and put it in the repository, thanks. > >> > >> Using the code below > >> > >> m_video = (new NSMovie()).initWithContentsOfURL("../../../video/ > >> 0-1-3-360_TheGame.flv"); > >> m_videoView = new NSMovieView(); > >> m_videoView.initWithFrame(frame); > >> m_videoView.showControllerAdjustingSize(false,true); > >> m_videoView.gotoBeginning(this); > >> m_videoView.setMovie(m_video); > >> m_videoView.start(); > >> > >> I expected the movie to start playing. It doesn't because the > >> NSMovie.netStreamHanleStatus function pauses the video the first time > >> it is called. Is this the desired behaviour? If it is what is the > >> suggested way to start a movie with no controller (some sort of > >> notification?). > >> > >> Also when the video is first loaded it is full of 'decompression' > >> artifacts (see game0.jpg). They are not in the video file. When I > >> play back the video using the code I originally wrote for this > >> program before porting it to actionstep no such degradation of the > >> video was apparent and when the video loops it is no longer there > >> after the first loop (see game1.jpg). Does anybody have any idea what > >> could be causing this? > >> > >> > >> > >> Cheers, > >> > >> Ewan > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> --------------------------------------------------------------------- > >> ---- > >> Using Tomcat but need to do more? Need to support web services, > >> security? > >> Get stuff done quickly with pre-integrated technology to make your > >> job easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> Geronimo > >> http://sel.as-us.falkag.net/sel? > >> cmd=lnk&kid=120709&bid=263057&dat=121642 > >> > >> _______________________________________________ > >> actionstep-core mailing list > >> act...@li... > >> https://lists.sourceforge.net/lists/listinfo/actionstep-core > >> > >> > >> > >> > > > > ---------------------------------------------------------------------- > > --- > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your > > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > |
From: Ewan M. <mr...@mr...> - 2006-08-27 18:41:32
|
Hello, The 'decompression' artifacts were caused by the video being played before it had finished initialising. Now I start the movie after it has finished initialising using a notification. However this shows up a bug in the changes made to NSMovieView.as , please see the fix Cheers, Ewan |
From: Scott H. <sc...@af...> - 2006-08-27 18:39:23
|
I checked in your changes, and I made a change that might help you out. I'm still not home, so it's a bit hard to do any tests. It doesn't look like I'll get back today, so it will have to be tomorrow to look at that artifacts issue (that I have actually noticed). Do you have any thoughts on what it might be? I have a feeling that it will just be a trial and error fix. Scott On 26/08/06, Scott Hyndman <sc...@af...> wrote: > I'll update it and take a look tomorrow when I get home. > > Thanks, > Scott > > On 26/08/06, Ewan McDougall <mr...@mr...> wrote: > > Hello, > > > > I've updated the NSMovieView.as > > > > Looping playback works and the correct aspect ratio of the movie is > > maintained. > > Could somebody check it and put it in the repository, thanks. > > > > Using the code below > > > > m_video = (new NSMovie()).initWithContentsOfURL("../../../video/ > > 0-1-3-360_TheGame.flv"); > > m_videoView = new NSMovieView(); > > m_videoView.initWithFrame(frame); > > m_videoView.showControllerAdjustingSize(false,true); > > m_videoView.gotoBeginning(this); > > m_videoView.setMovie(m_video); > > m_videoView.start(); > > > > I expected the movie to start playing. It doesn't because the > > NSMovie.netStreamHanleStatus function pauses the video the first time > > it is called. Is this the desired behaviour? If it is what is the > > suggested way to start a movie with no controller (some sort of > > notification?). > > > > Also when the video is first loaded it is full of 'decompression' > > artifacts (see game0.jpg). They are not in the video file. When I > > play back the video using the code I originally wrote for this > > program before porting it to actionstep no such degradation of the > > video was apparent and when the video loops it is no longer there > > after the first loop (see game1.jpg). Does anybody have any idea what > > could be causing this? > > > > > > > > Cheers, > > > > Ewan > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > |
From: Scott H. <sc...@af...> - 2006-08-26 23:53:00
|
I'll update it and take a look tomorrow when I get home. Thanks, Scott On 26/08/06, Ewan McDougall <mr...@mr...> wrote: > Hello, > > I've updated the NSMovieView.as > > Looping playback works and the correct aspect ratio of the movie is > maintained. > Could somebody check it and put it in the repository, thanks. > > Using the code below > > m_video = (new NSMovie()).initWithContentsOfURL("../../../video/ > 0-1-3-360_TheGame.flv"); > m_videoView = new NSMovieView(); > m_videoView.initWithFrame(frame); > m_videoView.showControllerAdjustingSize(false,true); > m_videoView.gotoBeginning(this); > m_videoView.setMovie(m_video); > m_videoView.start(); > > I expected the movie to start playing. It doesn't because the > NSMovie.netStreamHanleStatus function pauses the video the first time > it is called. Is this the desired behaviour? If it is what is the > suggested way to start a movie with no controller (some sort of > notification?). > > Also when the video is first loaded it is full of 'decompression' > artifacts (see game0.jpg). They are not in the video file. When I > play back the video using the code I originally wrote for this > program before porting it to actionstep no such degradation of the > video was apparent and when the video loops it is no longer there > after the first loop (see game1.jpg). Does anybody have any idea what > could be causing this? > > > > Cheers, > > Ewan > > > > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > |
From: Ewan M. <mr...@mr...> - 2006-08-26 15:07:55
|
Hello, I've updated the NSMovieView.as Looping playback works and the correct aspect ratio of the movie is maintained. Could somebody check it and put it in the repository, thanks. Using the code below m_video = (new NSMovie()).initWithContentsOfURL("../../../video/ 0-1-3-360_TheGame.flv"); m_videoView = new NSMovieView(); m_videoView.initWithFrame(frame); m_videoView.showControllerAdjustingSize(false,true); m_videoView.gotoBeginning(this); m_videoView.setMovie(m_video); m_videoView.start(); I expected the movie to start playing. It doesn't because the NSMovie.netStreamHanleStatus function pauses the video the first time it is called. Is this the desired behaviour? If it is what is the suggested way to start a movie with no controller (some sort of notification?). Also when the video is first loaded it is full of 'decompression' artifacts (see game0.jpg). They are not in the video file. When I play back the video using the code I originally wrote for this program before porting it to actionstep no such degradation of the video was apparent and when the video loops it is no longer there after the first loop (see game1.jpg). Does anybody have any idea what could be causing this? Cheers, Ewan |
From: Ray C. <rc...@gm...> - 2006-08-26 14:39:36
|
Hi, On 8/24/06, thomas mery <tho...@gm...> wrote: > hi > > the populate method is called after a remote call to a php script made in > createMenu, so I guess the app is already running. > > But is it a problem ? > > How would u go about such a case before the yesterday change ? calling the > createMcs method on each menu and submenu method ? Exactly. Invoke display on every menu when they are created. In your case, you can add that invocation in the loop when submenus are created. > It's true I am having problems getting around the display mechanism I a not > used to, would someone sum it up with examples ? Look at the documentation on osflash here: http://osflash.org/actionstep/documentation/views Feel free to post here if you find it insufficient. > tia > > thomas > > > > On 8/24/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > > > > but where is the SMMenu populate method called? Before the app is run or > after? > > > > On 8/24/06, thomas mery <tho...@gm...> wrote: > > > hi > > > > > > > > > On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > > > Hi, > > > > I've figured it out. It's got to do with the way windows are handled > > > > in ActionStep. It's been fixed. If you want to know more, read on. > > > > > > > > A window is made up of MovieClips (mcs). (Actually views are but for > > > > the sake of simplicity let's ignore that.) A menu contains windows. > > > > So when a menu (and hence the window) is created *before* NSApp is > > > > run, this takes place automatically, ie the mcs are created for you. > > > > > > > > But for your case, the windows are created *after* NSApp has started > > > > running (I assume), so they will not have their mcs created. I've > > > > changed that, so when a menu is displayed it's window is also forced > > > > to create it's own mcs. > > > > > > > > > > > > mmm > > > > > > I don't know but the sequence was : > > > > > > ------ > > > m_app = m_app = NSApplication.sharedApplication (); > > > > > > createMenu() //which contains m_mainMenu = (new > SMMenu()).initWithTitle("My > > > Menu"); where SMMenu is subclassing NSMenu > > > m_app.run(); > > > ------ > > > > > > so I thought the menu was created *before" I start the app. > > > > > > > > > > > > > > > > As for why you need to click it twice, apparently the display method > > > > is called when the submenu is detached. Sounds weird, huh? I've fixed > > > > this too. > > > > > > > > > > > > it works now, but what I don't get is why it was working with NSMenu but > not > > > with my subclass ... > > > > > > > > > thanks ! > > > > > > > > > > On 8/23/06, thomas mery < tho...@gm...> wrote: > > > > > hi all, > > > > > > > > > > I have tried to subclass NSMenu and have encountered a weird > behaviour. > > > > > > > > > > I have to click twice on my main items to make the submenus appear > (or > > > have > > > > > to rollover twice on submenus that have submenus) > > > > > > > > > > here is my code so maybe someone can tell me what i am doing wrong > ... > > > > > > > > > > import org.actionstep.menu.NSMenuItemCell; > > > > > import org.actionstep.menu.NSMenuView ; > > > > > import org.actionstep.NSApplication; > > > > > import org.actionstep.NSException ; > > > > > import org.actionstep.NSFont; > > > > > import org.actionstep.NSMenu; > > > > > import org.actionstep.NSMenuItem; > > > > > import org.actionstep.NSWindow; > > > > > > > > > > import > > > com.screenmatters.controllers.CategoriesController; > > > > > import com.screenmatters.controllers.SMController ; > > > > > import org.actionstep.NSPoint; > > > > > > > > > > /** > > > > > * @author tom > > > > > */ > > > > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > > > > > > > private var m_controller:CategoriesController; > > > > > > > > > > private var m_itemsArray:Object; > > > > > > > > > > public function SMMenu() { > > > > > > > > > > super(); > > > > > menuRepresentation().setHorizontal(false); > > > > > > > > > > } > > > > > > > > > > public function > initWithTitle(title:String):SMMenu > > > { > > > > > > > > > > super.initWithTitle(title); > > > > > return this; > > > > > > > > > > } > > > > > > > > > > public function > > > > > initWithController(controller:Function):SMMenu { > > > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > > > return this; > > > > > > > > > > } > > > > > > > > > > public function > setController(controller:Function) > > > { > > > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > > > return m_controller; > > > > > > > > > > } > > > > > > > > > > //returns menu controller > > > > > public function controller():Object { > > > > > > > > > > return m_controller; > > > > > > > > > > } > > > > > > > > > > public function > > > populate(itemsArray:Object,menu:SMMenu) > > > > > { > > > > > > > > > > if(menu == null) { > > > > > > > > > > menu = this; > > > > > > > > > > } > > > > > > > > > > if( itemsArray.length > 0) { > > > > > > > > > > var mi:NSMenuItem; > > > > > > > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > > > > > > > var itemName = > > > > > itemsArray[i]['CategoryName'][0]['name']; > > > > > mi = > > > > > menu.addItemWithTitleActionKeyEquivalent > (itemName); > > > > > mi.setTarget(this); > > > > > mi.setAction("traceMenuItem"); > > > > > > > > > > if(itemsArray[i]['children'].length > > > > > 0) { > > > > > > > > > > var submenu = (new > SMMenu()).initWithTitle("Menu > > > for " > > > > > + itemName); > > > > > menu.setSubmenuForItem (submenu,mi); > > > > > > > > > > populate(itemsArray[i]['children'],submenu); > > > > > > > > > > } > > > > > > > > > > } > > > > > > > > > > } > > > > > > > > > > } > > > > > } > > > > > > > > > > > > > > > > > > > > TIA > > > > > > > > > > thomas > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > Using Tomcat but need to do more? Need to support web services, > > > security? > > > > > Get stuff done quickly with pre-integrated technology to make your > job > > > > > easier > > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > > Geronimo > > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > > > _______________________________________________ > > > > > actionstep-core mailing list > > > > > act...@li... > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Cheers, > > > > Ray Chuan > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > Using Tomcat but need to do more? Need to support web services, > security? > > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > > > actionstep-core mailing list > > > > act...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > -- > > > > ---------------------------------------------------------- > > > Thomas Mery en concert : > > > > > > Septembre > > > 20/09 OPA - Paris > > > > > > Octobre > > > 14/10 Limoges > > > 15/10 --- > > > 16/10 --- > > > 17/10 Toulouse > > > 18/10 --- > > > 19/10 Bordeaux > > > 20/10 --- > > > 21/10 Reims > > > > > > Novembre > > > 10/11 Macon > > > > > > http://www.myspace.com/thomasmery > > > http://www.thomas-mery.net > > > > ---------------------------------------------------------- > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > -- > > Cheers, > > Ray Chuan > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > ---------------------------------------------------------- > > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |
From: Scott H. <sc...@af...> - 2006-08-25 12:52:52
|
That's a really good question. Most of the time, yes, you should call super.init()...unless you're overriding something like initWithFrame, in which case you should call super.initWithFrame(). And no, there isn't somewhere you should always look. But you must call an initializer in the superclass, without fail. Sometimes things will go very wrong if you don't. And don't worry about asking questions. It just makes us think a little bit. Ask away. :) Scott On 24/08/06, thomas mery <tho...@gm...> wrote: > hi > > yes I thought about that, this leads me to this question > > can I call super.init() every time I subclass for safety ? How would I know > what are the necessary steps when subclassing ? For example I subclassed > NSButton and I think I had to override cellClass and setCellClass, is that > right ? (Or could I just have called setClass on my custom button ? ) But Is > there a way to know for sure what needs to be overwritten to make sure the > child class works ? > > I know that in the appKit API reference there are infos about that, is it > where I should always look ? > > > sorry for all the questions but I really like ActionStep and would really > like to understand better :) > > thomas > > > On 8/24/06, Scott Hyndman <sc...@af...> wrote: > > I also notice that your initWithController() method doesn't call > > super.init(). This is usually quite important. > > > > Scott > > > > On 23/08/06, Ray Chuan <rc...@gm...> wrote: > > > Hi, > > > > > > but where is the SMMenu populate method called? Before the app is run or > after? > > > > > > On 8/24/06, thomas mery <tho...@gm...> wrote: > > > > hi > > > > > > > > > > > > On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > > > > Hi, > > > > > I've figured it out. It's got to do with the way windows are handled > > > > > in ActionStep. It's been fixed. If you want to know more, read on. > > > > > > > > > > A window is made up of MovieClips (mcs). (Actually views are but for > > > > > the sake of simplicity let's ignore that.) A menu contains windows. > > > > > So when a menu (and hence the window) is created *before* NSApp is > > > > > run, this takes place automatically, ie the mcs are created for you. > > > > > > > > > > But for your case, the windows are created *after* NSApp has started > > > > > running (I assume), so they will not have their mcs created. I've > > > > > changed that, so when a menu is displayed it's window is also forced > > > > > to create it's own mcs. > > > > > > > > > > > > > > > > mmm > > > > > > > > I don't know but the sequence was : > > > > > > > > ------ > > > > m_app = m_app = NSApplication.sharedApplication (); > > > > > > > > createMenu() //which contains m_mainMenu = (new > SMMenu()).initWithTitle("My > > > > Menu"); where SMMenu is subclassing NSMenu > > > > m_app.run(); > > > > ------ > > > > > > > > so I thought the menu was created *before" I start the app. > > > > > > > > > > > > > > > > > > > > > As for why you need to click it twice, apparently the display method > > > > > is called when the submenu is detached. Sounds weird, huh? I've > fixed > > > > > this too. > > > > > > > > > > > > > > > > it works now, but what I don't get is why it was working with NSMenu > but not > > > > with my subclass ... > > > > > > > > > > > > thanks ! > > > > > > > > > > > > > On 8/23/06, thomas mery <tho...@gm...> wrote: > > > > > > hi all, > > > > > > > > > > > > I have tried to subclass NSMenu and have encountered a weird > behaviour. > > > > > > > > > > > > I have to click twice on my main items to make the submenus appear > (or > > > > have > > > > > > to rollover twice on submenus that have submenus) > > > > > > > > > > > > here is my code so maybe someone can tell me what i am doing wrong > ... > > > > > > > > > > > > import org.actionstep.menu.NSMenuItemCell; > > > > > > import org.actionstep.menu.NSMenuView ; > > > > > > import org.actionstep.NSApplication; > > > > > > import org.actionstep.NSException ; > > > > > > import org.actionstep.NSFont; > > > > > > import org.actionstep.NSMenu ; > > > > > > import org.actionstep.NSMenuItem; > > > > > > import org.actionstep.NSWindow; > > > > > > > > > > > > import > > > > com.screenmatters.controllers.CategoriesController ; > > > > > > import com.screenmatters.controllers.SMController > ; > > > > > > import org.actionstep.NSPoint; > > > > > > > > > > > > /** > > > > > > * @author tom > > > > > > */ > > > > > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > > > > > > > > > private var > m_controller:CategoriesController; > > > > > > > > > > > > private var m_itemsArray:Object; > > > > > > > > > > > > public function SMMenu() { > > > > > > > > > > > > super(); > > > > > > > menuRepresentation().setHorizontal(false); > > > > > > > > > > > > } > > > > > > > > > > > > public function > initWithTitle(title:String):SMMenu > > > > { > > > > > > > > > > > > super.initWithTitle(title); > > > > > > return this; > > > > > > > > > > > > } > > > > > > > > > > > > public function > > > > > > initWithController(controller:Function):SMMenu { > > > > > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > > > > > return this; > > > > > > > > > > > > } > > > > > > > > > > > > public function > setController(controller:Function) > > > > { > > > > > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > > > > > return m_controller; > > > > > > > > > > > > } > > > > > > > > > > > > //returns menu controller > > > > > > public function controller():Object { > > > > > > > > > > > > return m_controller; > > > > > > > > > > > > } > > > > > > > > > > > > public function > > > > populate(itemsArray:Object,menu:SMMenu) > > > > > > { > > > > > > > > > > > > if(menu == null) { > > > > > > > > > > > > menu = this; > > > > > > > > > > > > } > > > > > > > > > > > > if( itemsArray.length > 0) { > > > > > > > > > > > > var mi:NSMenuItem; > > > > > > > > > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > > > > > > > > > var itemName = > > > > > > itemsArray[i]['CategoryName'][0]['name']; > > > > > > mi = > > > > > > menu.addItemWithTitleActionKeyEquivalent > (itemName); > > > > > > mi.setTarget(this); > > > > > > mi.setAction("traceMenuItem"); > > > > > > > > > > > > > if(itemsArray[i]['children'].length > > > > > 0) { > > > > > > > > > > > > var submenu = (new > SMMenu()).initWithTitle("Menu > > > > for " > > > > > > + itemName); > > > > > > menu.setSubmenuForItem(submenu,mi); > > > > > > > > > > > > populate(itemsArray[i]['children'],submenu); > > > > > > > > > > > > } > > > > > > > > > > > > } > > > > > > > > > > > > } > > > > > > > > > > > > } > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > TIA > > > > > > > > > > > > thomas > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > Using Tomcat but need to do more? Need to support web services, > > > > security? > > > > > > Get stuff done quickly with pre-integrated technology to make your > job > > > > > > easier > > > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > > > Geronimo > > > > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > > > > > _______________________________________________ > > > > > > actionstep-core mailing list > > > > > > act...@li... > > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Cheers, > > > > > Ray Chuan > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > Using Tomcat but need to do more? Need to support web services, > security? > > > > > Get stuff done quickly with pre-integrated technology to make your > job > > > > easier > > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > _______________________________________________ > > > > > actionstep-core mailing list > > > > > act...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > -- > > > > > ---------------------------------------------------------- > > > > Thomas Mery en concert : > > > > > > > > Septembre > > > > 20/09 OPA - Paris > > > > > > > > Octobre > > > > 14/10 Limoges > > > > 15/10 --- > > > > 16/10 --- > > > > 17/10 Toulouse > > > > 18/10 --- > > > > 19/10 Bordeaux > > > > 20/10 --- > > > > 21/10 Reims > > > > > > > > Novembre > > > > 10/11 Macon > > > > > > > > http://www.myspace.com/thomasmery > > > > http://www.thomas-mery.net > > > > > ---------------------------------------------------------- > > > > > ------------------------------------------------------------------------- > > > > Using Tomcat but need to do more? Need to support web services, > security? > > > > Get stuff done quickly with pre-integrated technology to make your job > > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > _______________________________________________ > > > > actionstep-core mailing list > > > > act...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Ray Chuan > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > ---------------------------------------------------------- > > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > |
From: thomas m. <tho...@gm...> - 2006-08-24 06:52:03
|
hi yes I thought about that, this leads me to this question can I call super.init() every time I subclass for safety ? How would I know what are the necessary steps when subclassing ? For example I subclassed NSButton and I think I had to override cellClass and setCellClass, is that right ? (Or could I just have called setClass on my custom button ? ) But Is there a way to know for sure what needs to be overwritten to make sure the child class works ? I know that in the appKit API reference there are infos about that, is it where I should always look ? sorry for all the questions but I really like ActionStep and would really like to understand better :) thomas On 8/24/06, Scott Hyndman <sc...@af...> wrote: > > I also notice that your initWithController() method doesn't call > super.init(). This is usually quite important. > > Scott > > On 23/08/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > > > > but where is the SMMenu populate method called? Before the app is run or > after? > > > > On 8/24/06, thomas mery <tho...@gm...> wrote: > > > hi > > > > > > > > > On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > > > Hi, > > > > I've figured it out. It's got to do with the way windows are handled > > > > in ActionStep. It's been fixed. If you want to know more, read on. > > > > > > > > A window is made up of MovieClips (mcs). (Actually views are but for > > > > the sake of simplicity let's ignore that.) A menu contains windows. > > > > So when a menu (and hence the window) is created *before* NSApp is > > > > run, this takes place automatically, ie the mcs are created for you. > > > > > > > > But for your case, the windows are created *after* NSApp has started > > > > running (I assume), so they will not have their mcs created. I've > > > > changed that, so when a menu is displayed it's window is also forced > > > > to create it's own mcs. > > > > > > > > > > > > mmm > > > > > > I don't know but the sequence was : > > > > > > ------ > > > m_app = m_app = NSApplication.sharedApplication (); > > > > > > createMenu() //which contains m_mainMenu = (new > SMMenu()).initWithTitle("My > > > Menu"); where SMMenu is subclassing NSMenu > > > m_app.run(); > > > ------ > > > > > > so I thought the menu was created *before" I start the app. > > > > > > > > > > > > > > > > As for why you need to click it twice, apparently the display method > > > > is called when the submenu is detached. Sounds weird, huh? I've > fixed > > > > this too. > > > > > > > > > > > > it works now, but what I don't get is why it was working with NSMenu > but not > > > with my subclass ... > > > > > > > > > thanks ! > > > > > > > > > > On 8/23/06, thomas mery <tho...@gm...> wrote: > > > > > hi all, > > > > > > > > > > I have tried to subclass NSMenu and have encountered a weird > behaviour. > > > > > > > > > > I have to click twice on my main items to make the submenus appear > (or > > > have > > > > > to rollover twice on submenus that have submenus) > > > > > > > > > > here is my code so maybe someone can tell me what i am doing wrong > ... > > > > > > > > > > import org.actionstep.menu.NSMenuItemCell; > > > > > import org.actionstep.menu.NSMenuView ; > > > > > import org.actionstep.NSApplication; > > > > > import org.actionstep.NSException ; > > > > > import org.actionstep.NSFont; > > > > > import org.actionstep.NSMenu; > > > > > import org.actionstep.NSMenuItem; > > > > > import org.actionstep.NSWindow; > > > > > > > > > > import > > > com.screenmatters.controllers.CategoriesController; > > > > > import com.screenmatters.controllers.SMController ; > > > > > import org.actionstep.NSPoint; > > > > > > > > > > /** > > > > > * @author tom > > > > > */ > > > > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > > > > > > > private var m_controller:CategoriesController; > > > > > > > > > > private var m_itemsArray:Object; > > > > > > > > > > public function SMMenu() { > > > > > > > > > > super(); > > > > > menuRepresentation().setHorizontal(false); > > > > > > > > > > } > > > > > > > > > > public function initWithTitle(title:String):SMMenu > > > { > > > > > > > > > > super.initWithTitle(title); > > > > > return this; > > > > > > > > > > } > > > > > > > > > > public function > > > > > initWithController(controller:Function):SMMenu { > > > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > > > return this; > > > > > > > > > > } > > > > > > > > > > public function setController(controller:Function) > > > { > > > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > > > return m_controller; > > > > > > > > > > } > > > > > > > > > > //returns menu controller > > > > > public function controller():Object { > > > > > > > > > > return m_controller; > > > > > > > > > > } > > > > > > > > > > public function > > > populate(itemsArray:Object,menu:SMMenu) > > > > > { > > > > > > > > > > if(menu == null) { > > > > > > > > > > menu = this; > > > > > > > > > > } > > > > > > > > > > if( itemsArray.length > 0) { > > > > > > > > > > var mi:NSMenuItem; > > > > > > > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > > > > > > > var itemName = > > > > > itemsArray[i]['CategoryName'][0]['name']; > > > > > mi = > > > > > menu.addItemWithTitleActionKeyEquivalent (itemName); > > > > > mi.setTarget(this); > > > > > mi.setAction("traceMenuItem"); > > > > > > > > > > if(itemsArray[i]['children'].length > > > > 0) { > > > > > > > > > > var submenu = (new > SMMenu()).initWithTitle("Menu > > > for " > > > > > + itemName); > > > > > menu.setSubmenuForItem(submenu,mi); > > > > > > > > > > populate(itemsArray[i]['children'],submenu); > > > > > > > > > > } > > > > > > > > > > } > > > > > > > > > > } > > > > > > > > > > } > > > > > } > > > > > > > > > > > > > > > > > > > > TIA > > > > > > > > > > thomas > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > Using Tomcat but need to do more? Need to support web services, > > > security? > > > > > Get stuff done quickly with pre-integrated technology to make your > job > > > > > easier > > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > > Geronimo > > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > > > _______________________________________________ > > > > > actionstep-core mailing list > > > > > act...@li... > > > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Cheers, > > > > Ray Chuan > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > Using Tomcat but need to do more? Need to support web services, > security? > > > > Get stuff done quickly with pre-integrated technology to make your > job > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > > > actionstep-core mailing list > > > > act...@li... > > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > -- > > > ---------------------------------------------------------- > > > Thomas Mery en concert : > > > > > > Septembre > > > 20/09 OPA - Paris > > > > > > Octobre > > > 14/10 Limoges > > > 15/10 --- > > > 16/10 --- > > > 17/10 Toulouse > > > 18/10 --- > > > 19/10 Bordeaux > > > 20/10 --- > > > 21/10 Reims > > > > > > Novembre > > > 10/11 Macon > > > > > > http://www.myspace.com/thomasmery > > > http://www.thomas-mery.net > > > ---------------------------------------------------------- > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > -- > > Cheers, > > Ray Chuan > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: thomas m. <tho...@gm...> - 2006-08-24 06:47:33
|
hi the populate method is called after a remote call to a php script made in createMenu, so I guess the app is already running. But is it a problem ? How would u go about such a case before the yesterday change ? calling the createMcs method on each menu and submenu method ? It's true I am having problems getting around the display mechanism I a not used to, would someone sum it up with examples ? tia thomas On 8/24/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > > but where is the SMMenu populate method called? Before the app is run or > after? > > On 8/24/06, thomas mery <tho...@gm...> wrote: > > hi > > > > > > On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > > Hi, > > > I've figured it out. It's got to do with the way windows are handled > > > in ActionStep. It's been fixed. If you want to know more, read on. > > > > > > A window is made up of MovieClips (mcs). (Actually views are but for > > > the sake of simplicity let's ignore that.) A menu contains windows. > > > So when a menu (and hence the window) is created *before* NSApp is > > > run, this takes place automatically, ie the mcs are created for you. > > > > > > But for your case, the windows are created *after* NSApp has started > > > running (I assume), so they will not have their mcs created. I've > > > changed that, so when a menu is displayed it's window is also forced > > > to create it's own mcs. > > > > > > > > mmm > > > > I don't know but the sequence was : > > > > ------ > > m_app = m_app = NSApplication.sharedApplication (); > > > > createMenu() //which contains m_mainMenu = (new > SMMenu()).initWithTitle("My > > Menu"); where SMMenu is subclassing NSMenu > > m_app.run(); > > ------ > > > > so I thought the menu was created *before" I start the app. > > > > > > > > > > > As for why you need to click it twice, apparently the display method > > > is called when the submenu is detached. Sounds weird, huh? I've fixed > > > this too. > > > > > > > > it works now, but what I don't get is why it was working with NSMenu but > not > > with my subclass ... > > > > > > thanks ! > > > > > > > On 8/23/06, thomas mery <tho...@gm...> wrote: > > > > hi all, > > > > > > > > I have tried to subclass NSMenu and have encountered a weird > behaviour. > > > > > > > > I have to click twice on my main items to make the submenus appear > (or > > have > > > > to rollover twice on submenus that have submenus) > > > > > > > > here is my code so maybe someone can tell me what i am doing wrong > ... > > > > > > > > import org.actionstep.menu.NSMenuItemCell; > > > > import org.actionstep.menu.NSMenuView ; > > > > import org.actionstep.NSApplication; > > > > import org.actionstep.NSException ; > > > > import org.actionstep.NSFont; > > > > import org.actionstep.NSMenu; > > > > import org.actionstep.NSMenuItem; > > > > import org.actionstep.NSWindow; > > > > > > > > import > > com.screenmatters.controllers.CategoriesController; > > > > import com.screenmatters.controllers.SMController ; > > > > import org.actionstep.NSPoint; > > > > > > > > /** > > > > * @author tom > > > > */ > > > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > > > > > private var m_controller:CategoriesController; > > > > > > > > private var m_itemsArray:Object; > > > > > > > > public function SMMenu() { > > > > > > > > super(); > > > > menuRepresentation().setHorizontal(false); > > > > > > > > } > > > > > > > > public function initWithTitle(title:String):SMMenu > > { > > > > > > > > super.initWithTitle(title); > > > > return this; > > > > > > > > } > > > > > > > > public function > > > > initWithController(controller:Function):SMMenu { > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > return this; > > > > > > > > } > > > > > > > > public function setController(controller:Function) > > { > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > return m_controller; > > > > > > > > } > > > > > > > > //returns menu controller > > > > public function controller():Object { > > > > > > > > return m_controller; > > > > > > > > } > > > > > > > > public function > > populate(itemsArray:Object,menu:SMMenu) > > > > { > > > > > > > > if(menu == null) { > > > > > > > > menu = this; > > > > > > > > } > > > > > > > > if( itemsArray.length > 0) { > > > > > > > > var mi:NSMenuItem; > > > > > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > > > > > var itemName = > > > > itemsArray[i]['CategoryName'][0]['name']; > > > > mi = > > > > menu.addItemWithTitleActionKeyEquivalent (itemName); > > > > mi.setTarget(this); > > > > mi.setAction("traceMenuItem"); > > > > > > > > if(itemsArray[i]['children'].length > > > 0) { > > > > > > > > var submenu = (new > SMMenu()).initWithTitle("Menu > > for " > > > > + itemName); > > > > menu.setSubmenuForItem(submenu,mi); > > > > > > > > populate(itemsArray[i]['children'],submenu); > > > > > > > > } > > > > > > > > } > > > > > > > > } > > > > > > > > } > > > > } > > > > > > > > > > > > > > > > TIA > > > > > > > > thomas > > > > > > > > > > > ------------------------------------------------------------------------- > > > > Using Tomcat but need to do more? Need to support web services, > > security? > > > > Get stuff done quickly with pre-integrated technology to make your > job > > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > _______________________________________________ > > > > actionstep-core mailing list > > > > act...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Ray Chuan > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > -- > > ---------------------------------------------------------- > > Thomas Mery en concert : > > > > Septembre > > 20/09 OPA - Paris > > > > Octobre > > 14/10 Limoges > > 15/10 --- > > 16/10 --- > > 17/10 Toulouse > > 18/10 --- > > 19/10 Bordeaux > > 20/10 --- > > 21/10 Reims > > > > Novembre > > 10/11 Macon > > > > http://www.myspace.com/thomasmery > > http://www.thomas-mery.net > > ---------------------------------------------------------- > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > -- > Cheers, > Ray Chuan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Scott H. <sc...@af...> - 2006-08-24 01:48:07
|
I also notice that your initWithController() method doesn't call super.init(). This is usually quite important. Scott On 23/08/06, Ray Chuan <rc...@gm...> wrote: > Hi, > > but where is the SMMenu populate method called? Before the app is run or after? > > On 8/24/06, thomas mery <tho...@gm...> wrote: > > hi > > > > > > On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > > Hi, > > > I've figured it out. It's got to do with the way windows are handled > > > in ActionStep. It's been fixed. If you want to know more, read on. > > > > > > A window is made up of MovieClips (mcs). (Actually views are but for > > > the sake of simplicity let's ignore that.) A menu contains windows. > > > So when a menu (and hence the window) is created *before* NSApp is > > > run, this takes place automatically, ie the mcs are created for you. > > > > > > But for your case, the windows are created *after* NSApp has started > > > running (I assume), so they will not have their mcs created. I've > > > changed that, so when a menu is displayed it's window is also forced > > > to create it's own mcs. > > > > > > > > mmm > > > > I don't know but the sequence was : > > > > ------ > > m_app = m_app = NSApplication.sharedApplication (); > > > > createMenu() //which contains m_mainMenu = (new SMMenu()).initWithTitle("My > > Menu"); where SMMenu is subclassing NSMenu > > m_app.run(); > > ------ > > > > so I thought the menu was created *before" I start the app. > > > > > > > > > > > As for why you need to click it twice, apparently the display method > > > is called when the submenu is detached. Sounds weird, huh? I've fixed > > > this too. > > > > > > > > it works now, but what I don't get is why it was working with NSMenu but not > > with my subclass ... > > > > > > thanks ! > > > > > > > On 8/23/06, thomas mery <tho...@gm...> wrote: > > > > hi all, > > > > > > > > I have tried to subclass NSMenu and have encountered a weird behaviour. > > > > > > > > I have to click twice on my main items to make the submenus appear (or > > have > > > > to rollover twice on submenus that have submenus) > > > > > > > > here is my code so maybe someone can tell me what i am doing wrong ... > > > > > > > > import org.actionstep.menu.NSMenuItemCell; > > > > import org.actionstep.menu.NSMenuView ; > > > > import org.actionstep.NSApplication; > > > > import org.actionstep.NSException ; > > > > import org.actionstep.NSFont; > > > > import org.actionstep.NSMenu; > > > > import org.actionstep.NSMenuItem; > > > > import org.actionstep.NSWindow; > > > > > > > > import > > com.screenmatters.controllers.CategoriesController; > > > > import com.screenmatters.controllers.SMController ; > > > > import org.actionstep.NSPoint; > > > > > > > > /** > > > > * @author tom > > > > */ > > > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > > > > > private var m_controller:CategoriesController; > > > > > > > > private var m_itemsArray:Object; > > > > > > > > public function SMMenu() { > > > > > > > > super(); > > > > menuRepresentation().setHorizontal(false); > > > > > > > > } > > > > > > > > public function initWithTitle(title:String):SMMenu > > { > > > > > > > > super.initWithTitle(title); > > > > return this; > > > > > > > > } > > > > > > > > public function > > > > initWithController(controller:Function):SMMenu { > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > return this; > > > > > > > > } > > > > > > > > public function setController(controller:Function) > > { > > > > > > > > m_controller = controller.getInstance(); > > > > > > > > return m_controller; > > > > > > > > } > > > > > > > > //returns menu controller > > > > public function controller():Object { > > > > > > > > return m_controller; > > > > > > > > } > > > > > > > > public function > > populate(itemsArray:Object,menu:SMMenu) > > > > { > > > > > > > > if(menu == null) { > > > > > > > > menu = this; > > > > > > > > } > > > > > > > > if( itemsArray.length > 0) { > > > > > > > > var mi:NSMenuItem; > > > > > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > > > > > var itemName = > > > > itemsArray[i]['CategoryName'][0]['name']; > > > > mi = > > > > menu.addItemWithTitleActionKeyEquivalent (itemName); > > > > mi.setTarget(this); > > > > mi.setAction("traceMenuItem"); > > > > > > > > if(itemsArray[i]['children'].length > > > 0) { > > > > > > > > var submenu = (new SMMenu()).initWithTitle("Menu > > for " > > > > + itemName); > > > > menu.setSubmenuForItem(submenu,mi); > > > > > > > > populate(itemsArray[i]['children'],submenu); > > > > > > > > } > > > > > > > > } > > > > > > > > } > > > > > > > > } > > > > } > > > > > > > > > > > > > > > > TIA > > > > > > > > thomas > > > > > > > > > > ------------------------------------------------------------------------- > > > > Using Tomcat but need to do more? Need to support web services, > > security? > > > > Get stuff done quickly with pre-integrated technology to make your job > > > > easier > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > > > _______________________________________________ > > > > actionstep-core mailing list > > > > act...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Ray Chuan > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, security? > > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > -- > > ---------------------------------------------------------- > > Thomas Mery en concert : > > > > Septembre > > 20/09 OPA - Paris > > > > Octobre > > 14/10 Limoges > > 15/10 --- > > 16/10 --- > > 17/10 Toulouse > > 18/10 --- > > 19/10 Bordeaux > > 20/10 --- > > 21/10 Reims > > > > Novembre > > 10/11 Macon > > > > http://www.myspace.com/thomasmery > > http://www.thomas-mery.net > > ---------------------------------------------------------- > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > -- > Cheers, > Ray Chuan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > |
From: Ray C. <rc...@gm...> - 2006-08-23 23:44:21
|
Hi, but where is the SMMenu populate method called? Before the app is run or after? On 8/24/06, thomas mery <tho...@gm...> wrote: > hi > > > On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > > I've figured it out. It's got to do with the way windows are handled > > in ActionStep. It's been fixed. If you want to know more, read on. > > > > A window is made up of MovieClips (mcs). (Actually views are but for > > the sake of simplicity let's ignore that.) A menu contains windows. > > So when a menu (and hence the window) is created *before* NSApp is > > run, this takes place automatically, ie the mcs are created for you. > > > > But for your case, the windows are created *after* NSApp has started > > running (I assume), so they will not have their mcs created. I've > > changed that, so when a menu is displayed it's window is also forced > > to create it's own mcs. > > > > mmm > > I don't know but the sequence was : > > ------ > m_app = m_app = NSApplication.sharedApplication (); > > createMenu() //which contains m_mainMenu = (new SMMenu()).initWithTitle("My > Menu"); where SMMenu is subclassing NSMenu > m_app.run(); > ------ > > so I thought the menu was created *before" I start the app. > > > > > > As for why you need to click it twice, apparently the display method > > is called when the submenu is detached. Sounds weird, huh? I've fixed > > this too. > > > > it works now, but what I don't get is why it was working with NSMenu but not > with my subclass ... > > > thanks ! > > > > On 8/23/06, thomas mery <tho...@gm...> wrote: > > > hi all, > > > > > > I have tried to subclass NSMenu and have encountered a weird behaviour. > > > > > > I have to click twice on my main items to make the submenus appear (or > have > > > to rollover twice on submenus that have submenus) > > > > > > here is my code so maybe someone can tell me what i am doing wrong ... > > > > > > import org.actionstep.menu.NSMenuItemCell; > > > import org.actionstep.menu.NSMenuView ; > > > import org.actionstep.NSApplication; > > > import org.actionstep.NSException ; > > > import org.actionstep.NSFont; > > > import org.actionstep.NSMenu; > > > import org.actionstep.NSMenuItem; > > > import org.actionstep.NSWindow; > > > > > > import > com.screenmatters.controllers.CategoriesController; > > > import com.screenmatters.controllers.SMController ; > > > import org.actionstep.NSPoint; > > > > > > /** > > > * @author tom > > > */ > > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > > > private var m_controller:CategoriesController; > > > > > > private var m_itemsArray:Object; > > > > > > public function SMMenu() { > > > > > > super(); > > > menuRepresentation().setHorizontal(false); > > > > > > } > > > > > > public function initWithTitle(title:String):SMMenu > { > > > > > > super.initWithTitle(title); > > > return this; > > > > > > } > > > > > > public function > > > initWithController(controller:Function):SMMenu { > > > > > > m_controller = controller.getInstance(); > > > > > > return this; > > > > > > } > > > > > > public function setController(controller:Function) > { > > > > > > m_controller = controller.getInstance(); > > > > > > return m_controller; > > > > > > } > > > > > > //returns menu controller > > > public function controller():Object { > > > > > > return m_controller; > > > > > > } > > > > > > public function > populate(itemsArray:Object,menu:SMMenu) > > > { > > > > > > if(menu == null) { > > > > > > menu = this; > > > > > > } > > > > > > if( itemsArray.length > 0) { > > > > > > var mi:NSMenuItem; > > > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > > > var itemName = > > > itemsArray[i]['CategoryName'][0]['name']; > > > mi = > > > menu.addItemWithTitleActionKeyEquivalent (itemName); > > > mi.setTarget(this); > > > mi.setAction("traceMenuItem"); > > > > > > if(itemsArray[i]['children'].length > > 0) { > > > > > > var submenu = (new SMMenu()).initWithTitle("Menu > for " > > > + itemName); > > > menu.setSubmenuForItem(submenu,mi); > > > > > > populate(itemsArray[i]['children'],submenu); > > > > > > } > > > > > > } > > > > > > } > > > > > > } > > > } > > > > > > > > > > > > TIA > > > > > > thomas > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > -- > > Cheers, > > Ray Chuan > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > ---------------------------------------------------------- > Thomas Mery en concert : > > Septembre > 20/09 OPA - Paris > > Octobre > 14/10 Limoges > 15/10 --- > 16/10 --- > 17/10 Toulouse > 18/10 --- > 19/10 Bordeaux > 20/10 --- > 21/10 Reims > > Novembre > 10/11 Macon > > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |
From: thomas m. <tho...@gm...> - 2006-08-23 17:22:14
|
hi there yes actually I think it happens when : accessing the app through a Main Class that calls an init method for instance it does not happen when : - launching the app directly from the class which has the main() function called by mtasc (to be verified I don't have time right now) - when loading the library at runtime and compiling agaisnt the intrisics classes (this I'm positive about) it might havs to do with using the SosLogger through as2lib, I havent tested with other loggers though I'm no guru as u lmight have noticed so I'm trying my best giving u hints about whats happening On 8/23/06, Scott Hyndman <sc...@af...> wrote: > > You're saying this happens on the test classes? > > Which ones? I've been hitting this problem myself lately, and it would > be great if it could be isolated in a test (because my stuff has so > much code I don't know where to begin). > > Scott > > On 23/08/06, thomas mery <tho...@gm...> wrote: > > hi all, > > > > posting again ... > > > > When I am running the actionstep cases (ASTest...) I am using as2lib and > SOS > > to do my tracing. > > > > I get a lot of : > > > > 18:09:33.473 org.actionstep.NSView.mcBoundsHolder():337 - > > NSException( > > NSException: > > Cannot access bounds holder movieclip until NSView is inserted into > view > > hierarchy., > > NSDictionary( > > NSView=>NSView(frame=NSRect(origin=NSPoint(x=0, y=0), > > size=NSSize(width=2000, height=2000)), > > bounds=NSRect(origin=NSPoint(x=0, y=0), > > size=NSSize(width=2000, height=2000)) clip=undefined) > > ) > > ) > > > > when the app starts and I have to say I don't get it ... > > > > it doesnt happen when loading the library with the Loader and compiling > > agaisnt the instrinsics classes > > > > help appreciated (I kniow this has come up before but could not find the > > post to the list :( ) > > > > thomas > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- Thomas Mery en concert : Septembre 20/09 OPA - Paris Octobre 14/10 Limoges 15/10 --- 16/10 --- 17/10 Toulouse 18/10 --- 19/10 Bordeaux 20/10 --- 21/10 Reims Novembre 10/11 Macon http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Scott H. <sc...@af...> - 2006-08-23 17:16:13
|
You're saying this happens on the test classes? Which ones? I've been hitting this problem myself lately, and it would be great if it could be isolated in a test (because my stuff has so much code I don't know where to begin). Scott On 23/08/06, thomas mery <tho...@gm...> wrote: > hi all, > > posting again ... > > When I am running the actionstep cases (ASTest...) I am using as2lib and SOS > to do my tracing. > > I get a lot of : > > 18:09:33.473 org.actionstep.NSView.mcBoundsHolder():337 - > NSException( > NSException: > Cannot access bounds holder movieclip until NSView is inserted into view > hierarchy., > NSDictionary( > NSView=>NSView(frame=NSRect(origin=NSPoint(x=0, y=0), > size=NSSize(width=2000, height=2000)), > bounds=NSRect(origin=NSPoint(x=0, y=0), > size=NSSize(width=2000, height=2000)) clip=undefined) > ) > ) > > when the app starts and I have to say I don't get it ... > > it doesnt happen when loading the library with the Loader and compiling > agaisnt the instrinsics classes > > help appreciated (I kniow this has come up before but could not find the > post to the list :( ) > > thomas > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > |
From: thomas m. <tho...@gm...> - 2006-08-23 16:48:48
|
hi well my code and the code in any test method of Test classes do just that so thats why I didn't understand the errors ... and they don't happen when I am compiling agaisnt the intrisics and loading the library at runtime so I thouhgt i was not a problem of view hierarchy which hopefully I assimilated now :) On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > this means that you're trying to display a "orphaned" view. See > > http://osflash.org/actionstep/documentation/views#hierarchy > > for more information. > > In ActionStep (or maybe Cocoa too), there are 2 types of views: a root > view (ASRootWindowView) and a normal view (NSView). > > A root view can be displayed by itself, but a normal view can't. It > needs to be inserted under a root view or another normal view > (setSubview). > > So to fix the error, create a window. > > var wnd:NSWindow = ... > wnd.contentView().setSubview(yourview); > > On 8/24/06, thomas mery <tho...@gm...> wrote: > > hi all, > > > > posting again ... > > > > When I am running the actionstep cases (ASTest...) I am using as2lib and > SOS > > to do my tracing. > > > > I get a lot of : > > > > 18:09:33.473 org.actionstep.NSView.mcBoundsHolder():337 - > > NSException( > > NSException: > > Cannot access bounds holder movieclip until NSView is inserted into > view > > hierarchy., > > NSDictionary( > > NSView=>NSView(frame=NSRect(origin=NSPoint(x=0, y=0), > > size=NSSize(width=2000, height=2000)), > > bounds=NSRect(origin=NSPoint(x=0, y=0), > > size=NSSize(width=2000, height=2000)) clip=undefined) > > ) > > ) > > > > when the app starts and I have to say I don't get it ... > > > > it doesnt happen when loading the library with the Loader and compiling > > agaisnt the instrinsics classes > > > > help appreciated (I kniow this has come up before but could not find the > > post to the list :( ) > > > > thomas > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > -- > Cheers, > Ray Chuan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- Thomas Mery en concert : Septembre 20/09 OPA - Paris Octobre 14/10 Limoges 15/10 --- 16/10 --- 17/10 Toulouse 18/10 --- 19/10 Bordeaux 20/10 --- 21/10 Reims Novembre 10/11 Macon http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: thomas m. <tho...@gm...> - 2006-08-23 16:45:42
|
hi On 8/23/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > I've figured it out. It's got to do with the way windows are handled > in ActionStep. It's been fixed. If you want to know more, read on. > > A window is made up of MovieClips (mcs). (Actually views are but for > the sake of simplicity let's ignore that.) A menu contains windows. So when a menu (and hence the window) is created *before* NSApp is > run, this takes place automatically, ie the mcs are created for you. > > But for your case, the windows are created *after* NSApp has started > running (I assume), so they will not have their mcs created. I've > changed that, so when a menu is displayed it's window is also forced > to create it's own mcs. mmm I don't know but the sequence was : ------ m_app = m_app = NSApplication.sharedApplication(); createMenu() //which contains m_mainMenu = (new SMMenu()).initWithTitle("My Menu"); where SMMenu is subclassing NSMenu m_app.run(); ------ so I thought the menu was created *before" I start the app. As for why you need to click it twice, apparently the display method > is called when the submenu is detached. Sounds weird, huh? I've fixed > this too. it works now, but what I don't get is why it was working with NSMenu but not with my subclass ... thanks ! On 8/23/06, thomas mery <tho...@gm...> wrote: > > hi all, > > > > I have tried to subclass NSMenu and have encountered a weird behaviour. > > > > I have to click twice on my main items to make the submenus appear (or > have > > to rollover twice on submenus that have submenus) > > > > here is my code so maybe someone can tell me what i am doing wrong ... > > > > import org.actionstep.menu.NSMenuItemCell; > > import org.actionstep.menu.NSMenuView; > > import org.actionstep.NSApplication; > > import org.actionstep.NSException ; > > import org.actionstep.NSFont; > > import org.actionstep.NSMenu; > > import org.actionstep.NSMenuItem; > > import org.actionstep.NSWindow; > > > > import com.screenmatters.controllers.CategoriesController; > > import com.screenmatters.controllers.SMController ; > > import org.actionstep.NSPoint; > > > > /** > > * @author tom > > */ > > class com.screenmatters.menu.SMMenu extends NSMenu { > > > > private var m_controller:CategoriesController; > > > > private var m_itemsArray:Object; > > > > public function SMMenu() { > > > > super(); > > menuRepresentation().setHorizontal(false); > > > > } > > > > public function initWithTitle(title:String):SMMenu { > > > > super.initWithTitle(title); > > return this; > > > > } > > > > public function > > initWithController(controller:Function):SMMenu { > > > > m_controller = controller.getInstance(); > > > > return this; > > > > } > > > > public function setController(controller:Function) { > > > > m_controller = controller.getInstance(); > > > > return m_controller; > > > > } > > > > //returns menu controller > > public function controller():Object { > > > > return m_controller; > > > > } > > > > public function populate(itemsArray:Object,menu:SMMenu) > > { > > > > if(menu == null) { > > > > menu = this; > > > > } > > > > if(itemsArray.length > 0) { > > > > var mi:NSMenuItem; > > > > for(var i:Number = 0; i < itemsArray.length; i++) { > > > > var itemName = > > itemsArray[i]['CategoryName'][0]['name']; > > mi = > > menu.addItemWithTitleActionKeyEquivalent (itemName); > > mi.setTarget(this); > > mi.setAction("traceMenuItem"); > > > > if(itemsArray[i]['children'].length > 0) { > > > > var submenu = (new SMMenu()).initWithTitle("Menu > for " > > + itemName); > > menu.setSubmenuForItem(submenu,mi); > > > > populate(itemsArray[i]['children'],submenu); > > > > } > > > > } > > > > } > > > > } > > } > > > > > > > > TIA > > > > thomas > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > -- > Cheers, > Ray Chuan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- Thomas Mery en concert : Septembre 20/09 OPA - Paris Octobre 14/10 Limoges 15/10 --- 16/10 --- 17/10 Toulouse 18/10 --- 19/10 Bordeaux 20/10 --- 21/10 Reims Novembre 10/11 Macon http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Ray C. <rc...@gm...> - 2006-08-23 16:37:46
|
Hi, this means that you're trying to display a "orphaned" view. See http://osflash.org/actionstep/documentation/views#hierarchy for more information. In ActionStep (or maybe Cocoa too), there are 2 types of views: a root view (ASRootWindowView) and a normal view (NSView). A root view can be displayed by itself, but a normal view can't. It needs to be inserted under a root view or another normal view (setSubview). So to fix the error, create a window. var wnd:NSWindow = ... wnd.contentView().setSubview(yourview); On 8/24/06, thomas mery <tho...@gm...> wrote: > hi all, > > posting again ... > > When I am running the actionstep cases (ASTest...) I am using as2lib and SOS > to do my tracing. > > I get a lot of : > > 18:09:33.473 org.actionstep.NSView.mcBoundsHolder():337 - > NSException( > NSException: > Cannot access bounds holder movieclip until NSView is inserted into view > hierarchy., > NSDictionary( > NSView=>NSView(frame=NSRect(origin=NSPoint(x=0, y=0), > size=NSSize(width=2000, height=2000)), > bounds=NSRect(origin=NSPoint(x=0, y=0), > size=NSSize(width=2000, height=2000)) clip=undefined) > ) > ) > > when the app starts and I have to say I don't get it ... > > it doesnt happen when loading the library with the Loader and compiling > agaisnt the instrinsics classes > > help appreciated (I kniow this has come up before but could not find the > post to the list :( ) > > thomas > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |
From: Ray C. <rc...@gm...> - 2006-08-23 16:28:52
|
Hi, I've figured it out. It's got to do with the way windows are handled in ActionStep. It's been fixed. If you want to know more, read on. A window is made up of MovieClips (mcs). (Actually views are but for the sake of simplicity let's ignore that.) A menu contains windows. So when a menu (and hence the window) is created *before* NSApp is run, this takes place automatically, ie the mcs are created for you. But for your case, the windows are created *after* NSApp has started running (I assume), so they will not have their mcs created. I've changed that, so when a menu is displayed it's window is also forced to create it's own mcs. As for why you need to click it twice, apparently the display method is called when the submenu is detached. Sounds weird, huh? I've fixed this too. On 8/23/06, thomas mery <tho...@gm...> wrote: > hi all, > > I have tried to subclass NSMenu and have encountered a weird behaviour. > > I have to click twice on my main items to make the submenus appear (or have > to rollover twice on submenus that have submenus) > > here is my code so maybe someone can tell me what i am doing wrong ... > > import org.actionstep.menu.NSMenuItemCell; > import org.actionstep.menu.NSMenuView; > import org.actionstep.NSApplication; > import org.actionstep.NSException ; > import org.actionstep.NSFont; > import org.actionstep.NSMenu; > import org.actionstep.NSMenuItem; > import org.actionstep.NSWindow; > > import com.screenmatters.controllers.CategoriesController; > import com.screenmatters.controllers.SMController ; > import org.actionstep.NSPoint; > > /** > * @author tom > */ > class com.screenmatters.menu.SMMenu extends NSMenu { > > private var m_controller:CategoriesController; > > private var m_itemsArray:Object; > > public function SMMenu() { > > super(); > menuRepresentation().setHorizontal(false); > > } > > public function initWithTitle(title:String):SMMenu { > > super.initWithTitle(title); > return this; > > } > > public function > initWithController(controller:Function):SMMenu { > > m_controller = controller.getInstance(); > > return this; > > } > > public function setController(controller:Function) { > > m_controller = controller.getInstance(); > > return m_controller; > > } > > //returns menu controller > public function controller():Object { > > return m_controller; > > } > > public function populate(itemsArray:Object,menu:SMMenu) > { > > if(menu == null) { > > menu = this; > > } > > if(itemsArray.length > 0) { > > var mi:NSMenuItem; > > for(var i:Number = 0; i < itemsArray.length; i++) { > > var itemName = > itemsArray[i]['CategoryName'][0]['name']; > mi = > menu.addItemWithTitleActionKeyEquivalent (itemName); > mi.setTarget(this); > mi.setAction("traceMenuItem"); > > if(itemsArray[i]['children'].length > 0) { > > var submenu = (new SMMenu()).initWithTitle("Menu for " > + itemName); > menu.setSubmenuForItem(submenu,mi); > > populate(itemsArray[i]['children'],submenu); > > } > > } > > } > > } > } > > > > TIA > > thomas > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |
From: thomas m. <tho...@gm...> - 2006-08-23 16:16:20
|
hi all, posting again ... When I am running the actionstep cases (ASTest...) I am using as2lib and SOS to do my tracing. I get a lot of : 18:09:33.473 org.actionstep.NSView.mcBoundsHolder():337 - NSException( NSException: Cannot access bounds holder movieclip until NSView is inserted into view hierarchy., NSDictionary( NSView=>NSView(frame=NSRect(origin=NSPoint(x=0, y=0), size=NSSize(width=2000, height=2000)), bounds=NSRect(origin=NSPoint(x=0, y=0), size=NSSize(width=2000, height=2000)) clip=undefined) ) ) when the app starts and I have to say I don't get it ... it doesnt happen when loading the library with the Loader and compiling agaisnt the instrinsics classes help appreciated (I kniow this has come up before but could not find the post to the list :( ) thomas |
From: thomas m. <tho...@gm...> - 2006-08-22 22:38:12
|
hi all, I have tried to subclass NSMenu and have encountered a weird behaviour. I have to click twice on my main items to make the submenus appear (or have to rollover twice on submenus that have submenus) here is my code so maybe someone can tell me what i am doing wrong ... import org.actionstep.menu.NSMenuItemCell; import org.actionstep.menu.NSMenuView; import org.actionstep.NSApplication; import org.actionstep.NSException; import org.actionstep.NSFont; import org.actionstep.NSMenu; import org.actionstep.NSMenuItem; import org.actionstep.NSWindow; import com.screenmatters.controllers.CategoriesController; import com.screenmatters.controllers.SMController; import org.actionstep.NSPoint; /** * @author tom */ class com.screenmatters.menu.SMMenu extends NSMenu { private var m_controller:CategoriesController; private var m_itemsArray:Object; public function SMMenu() { super(); menuRepresentation().setHorizontal(false); } public function initWithTitle(title:String):SMMenu { super.initWithTitle(title); return this; } public function initWithController(controller:Function):SMMenu { m_controller = controller.getInstance(); return this; } public function setController(controller:Function) { m_controller = controller.getInstance(); return m_controller; } //returns menu controller public function controller():Object { return m_controller; } public function populate(itemsArray:Object,menu:SMMenu) { if(menu == null) { menu = this; } if(itemsArray.length > 0) { var mi:NSMenuItem; for(var i:Number = 0; i < itemsArray.length; i++) { var itemName = itemsArray[i]['CategoryName'][0]['name']; mi = menu.addItemWithTitleActionKeyEquivalent(itemName); mi.setTarget(this); mi.setAction("traceMenuItem"); if(itemsArray[i]['children'].length > 0) { var submenu = (new SMMenu()).initWithTitle("Menu for " + itemName); menu.setSubmenuForItem(submenu,mi); populate(itemsArray[i]['children'],submenu); } } } } } TIA thomas |
From: thomas m. <tho...@gm...> - 2006-08-22 22:33:32
|
Hi all, I having a real hard time figuring out how to use embedded fonts with actionstep. I was trying to change the default font for all the application so I subclassed 'systemFontOfSize' in my custom theme. Here's what I did : function systemFontOfSize(fontSize:Number):NSFont { if (fontSize <= 0) { fontSize = systemFontSize(); } return NSFont.fontWithNameSizeEmbedded("Bliss", fontSize,true); } Of course the font has to be embedded in the swf so I tried the swfmill <font> solution which consists in a swml fil looking like this : <?xml version="1.0" encoding="iso-8859-1" ?> <movie width="1" height="1" framerate="12"> <frame> <library> <font id="Bliss" name="Bliss" import="D:\www\_sites\ScreenMatters\screenmatters.com\ressources\Fonts\BLISSHEAVY.TTF"/> </library> <Import file="fontsLibrary.swf" url=" http://mysite/flash/fontsLibrary.swf"></Import> </frame> </movie> It worked fine except that in an NSButton most of the fonts I have tried cause the button label to shifted approximatively 20 px up (using a NSButtonType.NSPushOnPushOffButton and pressing the button once shifts the label back into place ... ) + the fitToSize Method seems to not be working when the font is embedded it also appeared that menu items didn't seem to resize to the item text size properly and so the menu was not looking right (the end of the labels would for instance disappear under the arrow thats used to indicate a submenu) I then tried compiling on top of an already existing swf with the right font present in the library and linked with the correct id and the shifting dissapeared but the other problems didnt Would someone help me in solving this ? What is your preffered method regarding using embedded fonts ? thanks in advance thomas ps. is there an online app that is using actionstep ? I would have a look a indi but (would u believe it) I don't have a usb drive around. |
From: Scott H. <sc...@af...> - 2006-08-22 13:36:29
|
yes, you are correct. you must subclass ASTheme. Scott On 22/08/06, thomas mery <tho...@gm...> wrote: > hi ray > > I actually found them and overode systemFontOfSize in my custom theme > > this is how I should do it right ? no way of setting the system font out of > subclassing ASTheme ? > > cheers > > thomas > > > > On 8/22/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > > look at the methods that end with the suffix "FontOfSize" in ASTheme > > and ASThemeProtocol. For example, labelFontOfSize, > > controlContentFontOfSize. > > > > On 8/22/06, thomas mery < tho...@gm...> wrote: > > > hi all, > > > > > > i guess the answer is simple but ... > > > > > > how do I change the default application font ? > > > > > > didn't find some sort of ASTheme.setCurrentFont ... > > > > > > but maybe all I need is some insight on how fonts are handled at > application > > > level ... > > > > > > also I would like to know if the ASTheme class has an equivalent in > cocoa > > > ... I am looking in cocoa documentation as much as I can to understand > > > actionstep but could not figure out this one. > > > > > > thanks in advance > > > > > > thomas > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make your job > > > easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > _______________________________________________ > > > actionstep-core mailing list > > > act...@li... > > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > > > > > > > -- > > Cheers, > > Ray Chuan > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > -- > ---------------------------------------------------------- > Thomas Mery en concert : > > Septembre > 20/09 OPA - Paris > > Octobre > 14/10 Limoges > 15/10 --- > 16/10 --- > 17/10 Toulouse > 18/10 --- > 19/10 Bordeaux > 20/10 --- > 21/10 Reims > > Novembre > 10/11 Macon > > http://www.myspace.com/thomasmery > http://www.thomas-mery.net > ---------------------------------------------------------- > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > |
From: thomas m. <tho...@gm...> - 2006-08-22 12:53:05
|
hi ray I actually found them and overode systemFontOfSize in my custom theme this is how I should do it right ? no way of setting the system font out of subclassing ASTheme ? cheers thomas On 8/22/06, Ray Chuan <rc...@gm...> wrote: > > Hi, > look at the methods that end with the suffix "FontOfSize" in ASTheme > and ASThemeProtocol. For example, labelFontOfSize, > controlContentFontOfSize. > > On 8/22/06, thomas mery <tho...@gm...> wrote: > > hi all, > > > > i guess the answer is simple but ... > > > > how do I change the default application font ? > > > > didn't find some sort of ASTheme.setCurrentFont ... > > > > but maybe all I need is some insight on how fonts are handled at > application > > level ... > > > > also I would like to know if the ASTheme class has an equivalent in > cocoa > > ... I am looking in cocoa documentation as much as I can to understand > > actionstep but could not figure out this one. > > > > thanks in advance > > > > thomas > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > actionstep-core mailing list > > act...@li... > > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > > > > > > > -- > Cheers, > Ray Chuan > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > -- ---------------------------------------------------------- Thomas Mery en concert : Septembre 20/09 OPA - Paris Octobre 14/10 Limoges 15/10 --- 16/10 --- 17/10 Toulouse 18/10 --- 19/10 Bordeaux 20/10 --- 21/10 Reims Novembre 10/11 Macon http://www.myspace.com/thomasmery http://www.thomas-mery.net ---------------------------------------------------------- |
From: Ray C. <rc...@gm...> - 2006-08-22 12:48:01
|
Hi, look at the methods that end with the suffix "FontOfSize" in ASTheme and ASThemeProtocol. For example, labelFontOfSize, controlContentFontOfSize. On 8/22/06, thomas mery <tho...@gm...> wrote: > hi all, > > i guess the answer is simple but ... > > how do I change the default application font ? > > didn't find some sort of ASTheme.setCurrentFont ... > > but maybe all I need is some insight on how fonts are handled at application > level ... > > also I would like to know if the ASTheme class has an equivalent in cocoa > ... I am looking in cocoa documentation as much as I can to understand > actionstep but could not figure out this one. > > thanks in advance > > thomas > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > actionstep-core mailing list > act...@li... > https://lists.sourceforge.net/lists/listinfo/actionstep-core > > > -- Cheers, Ray Chuan |