Thread: [F-Script-talk] embedded question
Brought to you by:
pmougin
From: ackerman <rd...@pa...> - 2005-05-02 02:09:53
|
i am using the fscript palette to put a fscript view on my apps main window. when i do a 'sys browse' in it, in the left column i see 'sys = <an instance of System>'. Where are the objects of my program? shouldn't i see them there? |
From: ackerman <rd...@pa...> - 2005-05-02 02:35:58
|
On May 1, 2005, at 7:09 PM, ackerman wrote: > i am using the fscript palette to put a fscript view on my apps main > window. > when i do a 'sys browse' in it, in the left column i see 'sys = <an > instance of System>'. > Where are the objects of my program? shouldn't i see them there? i forgot to mention that i can use 'select view' to click on an object in my gui and see its attributes. but what i was interested in is a list of all the objects in my program -- not just gui objects that i can see in the interface. |
From: Felix F. <fe...@gm...> - 2005-05-02 08:47:09
|
> > On May 1, 2005, at 7:09 PM, ackerman wrote: > > i am using the fscript palette to put a fscript view on my apps main > > window. > > when i do a 'sys browse' in it, in the left column i see 'sys = <an > > instance of System>'. > > Where are the objects of my program? shouldn't i see them there? > > i forgot to mention that i can use 'select view' to click on an object > in my gui and see its attributes. > but what i was interested in is a list of all the objects in my program > -- not just gui objects that i can see in the interface. You can create an FSInterpreter-object and set objects via the setObject:forIdentifier: method. Something like: interpreter = [[FSInterpreter alloc] init] [interpreter setObject: myImportantObject forIdentifier: @"obj1"]; ... [interpreter browse]; now you should see "obj1" in the left column. HTH, felix -- . +++ GMX - die erste Adresse für Mail, Message, More +++ 10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail |
From: ackerman <rd...@pa...> - 2005-05-02 19:41:30
|
On May 2, 2005, at 1:46 AM, Felix Franz wrote: >> On May 1, 2005, at 7:09 PM, ackerman wrote: >>> i am using the fscript palette to put a fscript view on my apps main >>> window. >>> when i do a 'sys browse' in it, in the left column i see 'sys = <an >>> instance of System>'. >>> Where are the objects of my program? shouldn't i see them there? >> >> i forgot to mention that i can use 'select view' to click on an object >> in my gui and see its attributes. >> but what i was interested in is a list of all the objects in my >> program >> -- not just gui objects that i can see in the interface. > > You can create an FSInterpreter-object and set objects via > the setObject:forIdentifier: method. Something like: > > interpreter = [[FSInterpreter alloc] init] > [interpreter setObject: myImportantObject forIdentifier: @"obj1"]; > ... > [interpreter browse]; > > now you should see "obj1" in the left column. i was hoping to avoid this level of manually adding code to inspect an object. i want to type 'sys browse' in the FSInterpreterView and see a list of instances of all allocated objects, preferably listed by class. the docs seem to show this happening, but i don't see any object instances in my object browser. so i am wondering what i have to do to see my apps objects in the browser that is embedded in my app. Thanks for replying --- |
From: Philippe M. <pm...@ac...> - 2005-05-04 20:34:05
|
Le 2 mai 05 =E0 21:01, ackerman a =E9crit : [...] > i was hoping to avoid this level of manually adding code to inspect =20= > an object. > i want to type 'sys browse' in the FSInterpreterView and see a list =20= > of instances of all allocated objects, preferably listed by class. > the docs seem to show this happening, but i don't see any object =20 > instances in my object browser. > so i am wondering what i have to do to see my apps objects in the =20 > browser that is embedded in my app. Hi, This feature is not available in F-Script. I would like to add it but =20= I have no idea about how to implement it (i.e. how to get all the =20 instances in the current application). Does someone know how to do it ? Cheers, Philippe Mougin |
From: Nathan S. <nat...@jp...> - 2005-05-04 21:14:12
|
I'm no expert on ObjC or F-script so I'm not sure if this would work... But how about using a category to override NSObject's retain method (or=20= maybe alloc or init) that would send a message to some sort of tracker object while also doing the work of retain (which is hopefully well understood by someone outside of Apple) sorry that I don't have anything more than a vague notion... -Nathan On May 4, 2005, at 1:37 PM, Philippe Mougin wrote: > > Le 2 mai 05 =E0 21:01, ackerman a =E9crit : > > [...] > >> i was hoping to avoid this level of manually adding code to inspect=20= >> an object. >> i want to type 'sys browse' in the FSInterpreterView and see a list=20= >> of instances of all allocated objects, preferably listed by class. >> the docs seem to show this happening, but i don't see any object=20 >> instances in my object browser. >> so i am wondering what i have to do to see my apps objects in the=20 >> browser that is embedded in my app. > > Hi, > > This feature is not available in F-Script. I would like to add it but=20= > I have no idea about how to implement it (i.e. how to get all the=20 > instances in the current application). > > Does someone know how to do it ? > > Cheers, > > Philippe Mougin |
From: ackerman <rd...@pa...> - 2005-05-05 15:59:35
|
On May 4, 2005, at 2:14 PM, Nathan Strange wrote: > I'm no expert on ObjC or F-script so I'm not sure if this would work... > > But how about using a category to override NSObject's retain method > (or maybe > alloc or init) that would send a message to some sort of tracker object > while also doing the work of retain (which is hopefully well understood > by someone outside of Apple) > > sorry that I don't have anything more than a vague notion... > > -Nathan vague notions are better than none. couldn't the override just call NSObject's 'retain' method (or 'alloc' or 'init') - we wouldn't have to know its details. does anyone know of any code/plugin that does browse objects? that might give us a clue. is crawling the heap looking for objects out of the question? (not that i know how) |