Primate IDE – problems!

An user showed me a problem (a nasty one…)

If you type in Primate Scale scale,scale (that is valid Monkey code) my IDE converts it in Scale Scale,Scale – that’s no more valid as it ‘calls’ the mojo function Scale.

So I looked up in the last days to the highlight code to see how to resolve the problem. With some tricks I decided to force the IDE to ‘ignore’ field values that are ‘similar’ to keywords. So if you type something like

Field local:int, scale:float

if will be kept as you typed and no converted in Local or Scale:float.

Unfortunately after resolving this ‘little’ problem I discovered things will be more complicated.

What if I type scale?

It will be considered as the ‘field’ (or local, or global var) ‘scale’ or like the ‘command’ Scale?

I’ve checked how JungleIDE resolves the same problem: well it ‘register’ all vars (local,global,fields) so when you type scale it shows a pop-up from where you need to choose what you are referring to.

It works, and I’m sure there are no many other ways to resolve the thing.

Implementing a similar way in Primate is a quite hard work: I’ve already a ‘collection’ of Globals and Class, now I need to add Locals (based on Functions/classes!) – implement a pop-up window to choose things and so on.

But I’m on the idea to leave things like now: my idea of IDE is that it should be ‘faster’ and ‘immediate’. If I type something like a command, probably is a command and should be treated as a command. My solution is to change the name of fields/global/local when you type.

Surely this is a door opened for a lot of problems with other source code… but I just want to play with Monkey without messing around remembering how a command is typed!

Or just restart with a brand-new IDE.

Damned case-sensitive language!

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close