Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-05 Thread kilon alios
yes exactly On Mon, Apr 6, 2015 at 1:18 AM, Ben Coman wrote: > > > On Mon, Apr 6, 2015 at 2:16 AM, kilon alios wrote: > >> >> "Maybe we are not talking about the same thing ?" >> >> We do I just brought an alternative. My initial question is why this data >> is not stored inside a Collection an

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-05 Thread Ben Coman
On Mon, Apr 6, 2015 at 2:16 AM, kilon alios wrote: > > "Maybe we are not talking about the same thing ?" > > We do I just brought an alternative. My initial question is why this data > is not stored inside a Collection and instead individual methods are > preferred. > > But now that I thought it

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-05 Thread kilon alios
"SVG is human readable (XML based), no ?" yeap , XML format , nothing special. Athens has an importer for them. "If they are not too large, it might even be quite useful to store them as strings in the image, although I do agree this is not scalable in the end. (But Seaside uses this mechanism to

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-05 Thread Sven Van Caekenberghe
> On 05 Apr 2015, at 20:16, kilon alios wrote: > > Thank you for trying to help me understand :) You're welcome. > It was important for me to understand this because I want to import a lot of > SVG data into the image and I was not sure if I should use just SVG files or > instead use method

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-05 Thread kilon alios
"Maybe we are not talking about the same thing ?" We do I just brought an alternative. My initial question is why this data is not stored inside a Collection and instead individual methods are preferred. But now that I thought it through I understand in practice would not make much difference. An

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-05 Thread Sven Van Caekenberghe
Maybe we are not talking about the same thing ? You question the fact that the resource is stored as source code in the image instead of in a file ? If so, then the reason to keep them in image has to do with resource management, an image is self contained. I was talking about managing resourc

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
No really I dont get the idea, composition decomposition is the bread and butter of collection types in any language. Unless pharo has a weakness in this area that I am not aware of, in python I had never such problem. actually its a foremost reason to use them in the first place. Browsing is a lim

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Sven Van Caekenberghe
Because composition/decomposition is good (among others for re-use), because with separate entries you can browse them more easily, because we don't like long methods, ... You get the idea ;-) > On 04 Apr 2015, at 16:45, kilon alios wrote: > > once more I really dont like idea of methods retur

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
once more I really dont like idea of methods returning single values. This also one of the reasons why Spec annoys me. Why not have Collection / Dictionary that stores all these strings ? Having 100 methods for 100 icons seems really ugly . Instead one collection with 100 entries and a single meth

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
Aha, of course. The program makes assumptions about the file name and since it is naming the method like the file it fails, because you can't have "-" in method name. I could change it so it removes all non-alphanumeric characters from the name. Peter On Sat, Apr 4, 2015 at 3:52 PM, kilon alios

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
I found the problem "Norse_largeThe '-' prefix works only for literal numbers (use #negated instead) -> -cpcIconContents "Private - Method generated with the content of the file File @ /Users/kilon/Downloads/Norse_large-cpc.png"" looks like it does not like that i use "-" inside the file name

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
> > create file ? i thought the class only creates methods > yeah, I mean method > > anyway, the method is created , but it does not proceed to next png. > Shouldn create a method for each png it finds in the directory ? > yes it should, it operates on a collection, so if dir allFiles select: [ :e

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
create file ? i thought the class only creates methods anyway, the method is created , but it does not proceed to next png. Shouldn create a method for each png it finds in the directory ? On Sat, Apr 4, 2015 at 3:54 PM, Peter Uhnák wrote: > On Sat, Apr 4, 2015 at 2:46 PM, kilon alios wrote: >

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
On Sat, Apr 4, 2015 at 2:46 PM, kilon alios wrote: > actually i was wrong its not that large, only 34kbs , I have also attached > it if you want to take a look at it. > This works just fine for me; does it show any error for you? Or did it just create one file and then gave up? Peter

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
> > Or it seems cheap enough to just send #asFileReference to give the user a > bit of flexibility > Yep, I've changed that. Interesting that google is showing me, that you've replied 8 minutes before I even posted it. :)

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
actually i was wrong its not that large, only 34kbs , I have also attached it if you want to take a look at it. On Sat, Apr 4, 2015 at 3:41 PM, Peter Uhnák wrote: > createIconsFromDirectory seems to see only the first png, maybe because >> its too large >> > how large? > > createIconFromFile giv

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Sean P. DeNigris
Peter Uhnák wrote > it accepts a FileReference, not a string; I should put guard there. Or it seems cheap enough to just send #asFileReference to give the user a bit of flexibility - Cheers, Sean -- View this message in context: http://forum.world.st/IconFactory-utility-for-creating-icons-

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
Also if it really sees only the first file, try dir allFiles select: [ :each | each extension = 'png' ], because that would mean FileSystem is failing or something. Peter On Sat, Apr 4, 2015 at 2:41 PM, Peter Uhnák wrote: > createIconsFromDirectory seems to see only the first png, maybe becaus

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
> > createIconsFromDirectory seems to see only the first png, maybe because > its too large > how large? createIconFromFile gives me a MNU > it accepts a FileReference, not a string; I should put guard there. Peter

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
yes thats better , install works, first step works too. createIconsFromDirectory seems to see only the first png, maybe because its too large. createIconFromFile gives me a MNU: ByteString >> base [1]. Why those methods are not on the class side ? [1]ByteString(Object)>>doesNotUnderstand: #base

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
That's strange :< try this please Gofer new smalltalkhubUser: 'peteruhnak' project: 'IconFactory'; package: 'IconFactory'; load. In the meantime I'll be fixing the configuration... but it should be ok. :/ Peter On Sat, Apr 4, 2015 at 2:00 PM, kilon alios wrote: > Tried your install i

Re: [Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread kilon alios
Tried your install instructions but give me an error[1] about being unable to resolve IconFactory , tries to look inside my package-cache of my image (pharo 4 - 40591 -MACOSX 10). Interesting tool, out of coincidence I am also working with icons but in my cases its SVG icons using Bloc . [1] Meta

[Pharo-users] IconFactory - utility for creating icons in Pharo

2015-04-04 Thread Peter Uhnák
Hi, since I've been making new icons lately for my project I was frustrated with constantly copying code and methods around... so I've made a small utility for it http://smalltalkhub.com/#!/~peteruhnak/IconFactory ​ on top of creating the icons it can add extra stuff like GTInspector support.