Hi Colin,
What I have to do is create a development browser for Scheme within Squeak.
This is a continuation of work done by Alexandre Bergel who I doing it for.
So what I need to add are commands to compile and to do other similar
things.
So how do I add these commands then?
I added the following:
actionsForNode:aNode
^{OBAction
label:'remove'
receiver:self
selector: #removeFile:
arguments:{aNode}
keystroke:$x
icon: MenuIcons smallCancelIcon.
OBAction
label:'rename'
receiver:self
selector:#renameFile:
arguments:{aNode}}
to a actionForNode for FileActor then when I saved goes bold:
actionForNode:aNode.
When I open the browser no difference in sight. This isn't too important if
I implement the new command menus instead but would be good to know why it
doesn't work.
Thanks,
Julian
-----Original Message-----
From:
[hidden email]
[mailto:
[hidden email]] On Behalf Of Colin
Putney
Sent: 06 February 2007 04:14
To: The general-purpose Squeak developers list
Subject: Re: omnibrowser - actors
On Feb 5, 2007, at 8:14 AM, Julian Daly wrote:
> Can anyone help? I need to add some actors to an simple omnibrowser
> file browser that I have created.
>
> How do I add an actor correctly?
It's not hard if you've created your own browser. When building your
metagraph, you just need create an instance of your actor class and
add it to the correct metanode with #addActor:.
On the other hand, actors are deprecated. Future versions of OB will
use a simpler method for creating menus, called commands. Depending
on what you're doing, you might want to go straight to that
architecture instead. If so, let me know and I can help you get started.
Colin