[Cuis] Two questions

Juan Vuletich juan at jvuletich.org
Fri Jul 11 06:50:04 CDT 2014


Hi Hari,

On 7/10/2014 11:12 PM, Hari Balaraman wrote:
> Apologies for stuffing your mailboxes.. Figured it out. I use the superclass method of the ClassBuilder class.
> Regards,
> Hari
>

Yes. Just for the record, the text you save on a Browser when you create 
a new class, is just a Smalltalk expression, a message sent to the class 
you subclass. Just evaluating such code in any part of your application 
will create a new class.

As you see in any class definition, the instanceVariableNames: is a 
string comprising variable names, separated by a space.

Cheers,
Juan Vuletich


> On Jul 10, 2014, at 1:03 PM, Hari Balaraman<hbalaraman at gmail.com>  wrote:
>
>> Folks,
>>
>> I have two questions and many thanks in advance for any suggestions or advice you can offer:
>>
>> 1. I was wondering about how to create new classes from the workspace rather than changing a class definition in a browser and saving.
>>
>> I’ve been attempting to use "newSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass" for ClassBuilder in Kernel-Classes but cannot decipher how to format the instance variables argument.
>>
>> This is what I type into my workspace:
>>
>> m:= ClassBuilder new.
>> m newSubclassOf: NewClass type: Object instanceVariables: ‘newinstvariable' from: SubClassOfNewClass
>>
>> The reason I am doing is - I am trying to find a way to generate new class definitions in my application from a GUI rather than type things into a browser. So this is my first step.
>>
>> 2. Why does the mouse always highlight the window it is over? I find that more often than not, when I highlight text from one workspace or from a browser window and look to copy into a workspace or inspector, I move the arrow out of the way to focus on what I am typing but therefore end up typing or deleting in some other window because that window is not automatically brought to the front by the pointer. Is there a way I can change this default behaviour?
>>
>> Best regards,
>>
>> Hari
>>
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>





More information about the Cuis mailing list