On a useless cellphone right now. IIRC, you can do something like
Preferences explore This should give you a view into the preferences object. I think you should be looking to disable (set to false) something like 'focusFollowsMouse' but again, I can't look right now. Hopefully I haven't led you too far astray here, but I think it's in there. If you don't find it, bug me again and I'll figure it out for sure. Casey > On Jul 10, 2014, at 10:03 AM, Hari Balaraman <[hidden email]> 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 > [hidden email] > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
In reply to this post by hbalaraman
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<[hidden email]> 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 > [hidden email] > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org > _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
In reply to this post by hbalaraman
Hi Hari,
On 7/10/2014 2:03 PM, Hari Balaraman 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 Many times I find it useful to give focus to a field by just moving the mouse, without needing a mouse click. If you prefer the more conventional 'click-to-focus' behavior, just evaluate: Preferences disable: #focusFollowsMouse Maybe it could be useful to have this (and maybe others) accessible from the World / Preferences menu. Feel free to implement it, and publish the code (mail attach, Git pull request, any means is ok). Cheers, Juan Vuletich _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
Will try my hand at it. Code will probably look really clunky. :)
H On Jul 11, 2014, at 7:55 AM, Juan Vuletich <[hidden email]> wrote: > Hi Hari, > > On 7/10/2014 2:03 PM, Hari Balaraman 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 > > Many times I find it useful to give focus to a field by just moving the mouse, without needing a mouse click. > > If you prefer the more conventional 'click-to-focus' behavior, just evaluate: > > Preferences disable: #focusFollowsMouse > > Maybe it could be useful to have this (and maybe others) accessible from the World / Preferences menu. Feel free to implement it, and publish the code (mail attach, Git pull request, any means is ok). > > Cheers, > Juan Vuletich _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
In reply to this post by Casey Ransberger-2
Hi Casey,
Thanks! Best regards, Hari On Jul 11, 2014, at 1:06 AM, Casey Ransberger <[hidden email]> wrote: > On a useless cellphone right now. IIRC, you can do something like > > Preferences explore > > This should give you a view into the preferences object. I think you should be looking to disable (set to false) something like 'focusFollowsMouse' but again, I can't look right now. > > Hopefully I haven't led you too far astray here, but I think it's in there. If you don't find it, bug me again and I'll figure it out for sure. > > Casey > >> On Jul 10, 2014, at 10:03 AM, Hari Balaraman <[hidden email]> 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 >> [hidden email] >> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org > > _______________________________________________ > Cuis mailing list > [hidden email] > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
In reply to this post by Juan Vuletich-4
> On Jul 11, 2014, at 4:55 AM, Juan Vuletich <[hidden email]> wrote:
> > Maybe it could be useful to have this (and maybe others) accessible from the World / Preferences menu. Feel free to implement it, and publish the code (mail attach, Git pull request, any means is ok). If Hari doesn't get around to it in the next week or so, someone bug me and I'll do it. We're "fighting the power" a bit on this, and if we don't make the compu-normative behavior the default (ugh) we should definitely make the preference easy to discover and change for newcomers. On the subject: since most prefs are just enable/disable, what do folks think about a small project to put them all in the menu system (rather than some heavy-handed PreferenceBrowser?) The snags will all be non-Boolean prefs which would need either submenus or dialogs. My thought is that the mainstay of preference interaction could be programmatically generated based on the prefs object's structure except in unusual cases (which would need to be handled with cleverness.) Thoughts? Please shoot holes in my hot air balloon, dear friends. --C _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
On 12/07/2014 11:10 a.m., Casey Ransberger wrote:
>> On Jul 11, 2014, at 4:55 AM, Juan Vuletich<[hidden email]> wrote: >> >> Maybe it could be useful to have this (and maybe others) accessible from the World / Preferences menu. Feel free to implement it, and publish the code (mail attach, Git pull request, any means is ok). > If Hari doesn't get around to it in the next week or so, someone bug me and I'll do it. We're "fighting the power" a bit on this, and if we don't make the compu-normative behavior the default (ugh) we should definitely make the preference easy to discover and change for newcomers. > > On the subject: since most prefs are just enable/disable, what do folks think about a small project to put them all in the menu system (rather than some heavy-handed PreferenceBrowser?) > > The snags will all be non-Boolean prefs which would need either submenus or dialogs. My thought is that the mainstay of preference interaction could be programmatically generated based on the prefs object's structure except in unusual cases (which would need to be handled with cleverness.) > > Thoughts? Please shoot holes in my hot air balloon, dear friends. > > --C > _______________________________________________ > Cuis mailing list > [hidden email] > http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org > Haven't thought much about all this, but please keep the ball rolling. First, do it just for booleans. I'm sure playing with it will help further ideas to appear... Cheers, Juan Vuletich _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
In reply to this post by Juan Vuletich-4
Folks,
I’ve been playing around with the Styled Text Editor and noticed two issues, one is that the default size of the SystemWindow is smaller than the toolbar and the second is that when the window is resized, every part of the toolbar becomes progressively transparent other than the second PluggableFilteringDropDownListMorph (relating to CharacterStyle). For the SystemWindow size on initialisation, I have used a very inelegant hack in the editFancierStyledText class method for the SystemWindow class by specifying a large enough morphExtent to the SystemWindow. But for the lack of transparency of the second PluggableFilteringDropDownListMorph on the resizing of the overall SystemWindow, I am lost. On examining and comparing, in inspectors, the two PluggableFilteringDropDownListMorphs in the toolbar, I find the only difference to be in the labels. I attach screenshots to illustrate the behaviour. Editor window fully extended outwards. Editor window partially constrained. Editor window fully constrained with second toolbar not transparent. I had one question for any folks that might know. What format does the text editor save files in? I saved it on the filesystem but couldn’t access it using textedit. If it isn’t accessible by non-smalltalk editors, is there a text editor you know of that I can install that will allow me to read and write to files on the filesystems. I started down that path last week writing to plaintext files (for an app I am building) but wanted to avoid reinventing the wheel in case it has already been done (also why I got pretty excited today about the stylised text editor.) On the issue of enabling and disabling the focusFollowsMouse preference, I attach an awful hack to the Preferences menu that unfortunately gets the job done for me in the latest image. Best regards, Hari _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org Screen Shot 2014-07-24 at 12.46.30 AM.png (93K) Download Attachment Screen Shot 2014-07-24 at 12.46.46 AM.png (91K) Download Attachment Screen Shot 2014-07-24 at 12.47.03 AM.png (29K) Download Attachment Morphic-Menus.st (110K) Download Attachment System-Support.st (433K) Download Attachment |
Hi Hari,
On 7/24/2014 2:00 AM, Hari Balaraman wrote: Folks, Thanks for the report, Hari. I recently did some changes in morphic submorph clipping. Clipping is now done only on the first submorph. This is enough for scroll panes and such. And windows (together with most morphs) don't really need clipping, but good layout handling. I just committed a new version of StyledTextEditor to fix this. I had one question for any folks that might know. What format does the text editor save files in? I saved it on the filesystem but couldn’t access it using textedit. If it isn’t accessible by non-smalltalk editors, is there a text editor you know of that I can install that will allow me to read and write to files on the filesystems. I started down that path last week writing to plaintext files (for an app I am building) but wanted to avoid reinventing the wheel in case it has already been done (also why I got pretty excited today about the stylised text editor.) Right now, we are saving files with SmartRefStream, as Smalltalk serialized objects. The code to support RTF is there, but I don't really like RTF, especially as it doesn't have a concept of styles. I think the best would be to be able to save and read .MD (markdown) format. And use a set of styles that match what markdown provides. Someone would need to code this, though. But I don't think it would be too hard if you or anybody wants to give it a try.
I integrated your code in Cuis today. I think it makes sense, and is not hacky at all. Cheers, Juan Vuletich _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
>
>> I had one question for any folks that might know. What format does the text editor save files in? I saved it on the filesystem but couldn’t access it using textedit. If it isn’t accessible by non-smalltalk editors, is there a text editor you know of that I can install that will allow me to read and write to files on the filesystems. I started down that path last week writing to plaintext files (for an app I am building) but wanted to avoid reinventing the wheel in case it has already been done (also why I got pretty excited today about the stylised text editor.) > > Right now, we are saving files with SmartRefStream, as Smalltalk serialized objects. The code to support RTF is there, but I don't really like RTF, especially as it doesn't have a concept of styles. I think the best would be to be able to save and read .MD (markdown) format. And use a set of styles that match what markdown provides. Someone would need to code this, though. But I don't think it would be too hard if you or anybody wants to give it a try. > Hi Juan, I’m aiming (as my work and free time permit) for generating files in the opendocument format. After spending some time experimenting with generating odt files from text files (it’s just xml on the inside), I pared my ambitions to generating single file .fodt files (which are readable by libreoffice and openoffice - and are saved with linebreaks [at least on my system] and so are much more readable on a text editor.) Learning as I go along, and will revert with something constructive as soon as I can. Regards, Hari _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
On 8/13/2014 11:55 PM, Hari Balaraman wrote:
>>> I had one question for any folks that might know. What format does the text editor save files in? I saved it on the filesystem but couldn’t access it using textedit. If it isn’t accessible by non-smalltalk editors, is there a text editor you know of that I can install that will allow me to read and write to files on the filesystems. I started down that path last week writing to plaintext files (for an app I am building) but wanted to avoid reinventing the wheel in case it has already been done (also why I got pretty excited today about the stylised text editor.) >> Right now, we are saving files with SmartRefStream, as Smalltalk serialized objects. The code to support RTF is there, but I don't really like RTF, especially as it doesn't have a concept of styles. I think the best would be to be able to save and read .MD (markdown) format. And use a set of styles that match what markdown provides. Someone would need to code this, though. But I don't think it would be too hard if you or anybody wants to give it a try. >> > Hi Juan, > I’m aiming (as my work and free time permit) for generating files in the opendocument format. After spending some time experimenting with generating odt files from text files (it’s just xml on the inside), I pared my ambitions to generating single file .fodt files (which are readable by libreoffice and openoffice - and are saved with linebreaks [at least on my system] and so are much more readable on a text editor.) > Learning as I go along, and will revert with something constructive as soon as I can. > Regards, > Hari Great! We'll be awaiting for that. Cheers, Juan Vuletich _______________________________________________ Cuis mailing list [hidden email] http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org |
Free forum by Nabble | Edit this page |