I've just uploaded a new version of the GemStone Browser for OS X (the source code is available).
http://bitbucket.org/eligreen/gskit/ It's a good leap forward from the last version I put out. First of all, there's the fact that you can actually save methods although this is not very robust as I don't check for errors; they just show up in the console. I was expecting exceptions but it doesn't seem to throw them. Second, the Smalltalk parser has been vastly improved and now generates a tree of tokens which is used, in this release, to colour some tokens (the reserved words, numbers, strings and comments). With a small amount of effort, it should enable highlighting all instances of the currently selected variable in the method and highlighting the current level of "nesting" (in parentheses, blocks, etc). It could be used to do refactoring but I would much rather leverage the existing Smalltalk refactoring tools for that sort of thing. My next focus will be: 1. The debugger. At the moment there is a completely pointless window that pops up if an exception is thrown and the only bit of information displayed is the error message itself. 2. Bi-directional communication. I would like to create a GemStone proxy class that can forward messages back to Objective-C land. I think this can be accomplished with a user action (I have tried and it seems to work) although the dual-objectspace issues complicate things as always. The first proof of concept will be a working transcript. As always, it would be great to hear from anybody using this or interested in it. I am posting this to the mailing list on the assumption that it's the correct place but if I am bothering anybody, I can find another way of getting this information out there. Regards, Eli |
On May 18, 2010, at 2:40 PM, Eli Green wrote: > 2. Bi-directional communication. > > I would like to create a GemStone proxy class that can forward messages back to Objective-C land. I think this can be accomplished with a user action (I have tried and it seems to work) although the dual-objectspace issues complicate things as always. The first proof of concept will be a working transcript. Another way to approach this would be with an Exception that is trapped at the client, information extracted, and the the process resumed. James |
In reply to this post by Eli Green-5
On May 19, 2010, at 01:27, James Foster wrote: > > On May 18, 2010, at 2:40 PM, Eli Green wrote: > >> 2. Bi-directional communication. >> >> I would like to create a GemStone proxy class that can forward messages back to Objective-C land. I think this can be accomplished with a user action (I have tried and it seems to work) although the dual-objectspace issues complicate things as always. The first proof of concept will be a working transcript. > > Another way to approach this would be with an Exception that is trapped at the client, information extracted, and the the process resumed. > Is there any advantage to doing it this way rather than via user actions? My plan had been to make an object that implements doesNotUnderstand and forwards it the user action with arguments something like ( objectIdentifier, messageName, arg1, arg2 ... argN ) and to maintain a dictionary of objects in the client for fast lookup by objectIdentifier (I thought of using the pointer but then realized that was too dangerous). |
In reply to this post by Eli Green-5
On May 19, 2010, at 12:41 AM, Eli Green wrote: > > On May 19, 2010, at 01:27, James Foster wrote: > >> >> On May 18, 2010, at 2:40 PM, Eli Green wrote: >> >>> 2. Bi-directional communication. >>> >>> I would like to create a GemStone proxy class that can forward messages back to Objective-C land. I think this can be accomplished with a user action (I have tried and it seems to work) although the dual-objectspace issues complicate things as always. The first proof of concept will be a working transcript. >> >> Another way to approach this would be with an Exception that is trapped at the client, information extracted, and the the process resumed. >> > > Is there any advantage to doing it this way rather than via user actions? My plan had been to make an object that implements doesNotUnderstand and forwards it the user action with arguments something like ( objectIdentifier, messageName, arg1, arg2 ... argN ) and to maintain a dictionary of objects in the client for fast lookup by objectIdentifier (I thought of using the pointer but then realized that was too dangerous). First, you will need to handle exceptions anyway, since not all errors will be #'doesNotUnderstand:'. Second, traditionally, user actions are written in 'C' while an exception handler is written in Smalltalk so the exception handler approach is much more attractive. Since you would write both in Objective C, then the preference is less obvious. James |
In reply to this post by Eli Green-5
On Wed, May 19, 2010 at 15:11, James Foster <[hidden email]> wrote:
> > First, you will need to handle exceptions anyway, since not all errors will be #'doesNotUnderstand:'. Second, traditionally, user actions are written in 'C' while an exception handler is written in Smalltalk so the exception handler approach is much more attractive. Since you would write both in Objective C, then the preference is less obvious. > I do indeed already handle exceptions. You can set a delegate on a GSConnection that will receive a message when any error is raised. Currently I pop up my near-useless debugger but obviously the plan is to make the debugger not be so useless. This is why I would like to use user actions; since exceptions will be treated as errors, it seems conceptually cleaner to use user actions. Does GemStone provide some kind of mechanism for sending messages between two clients connected to the same stone? |
In reply to this post by Eli Green-5
On May 20, 2010, at 1:39 AM, Eli Green wrote: > Does GemStone provide some kind of mechanism for sending messages > between two clients connected to the same stone? Yes. See 10.3 'Gem-to-Gem Signaling' in the Programming Guide (http://www.gemstone.com/docs/GemStoneS/GemStone64Bit/2.4/GS64-ProgGuide-2.4.pdf). James |
Free forum by Nabble | Edit this page |