I have a whole slew of images to use. Some can be cached on the server
and many are found in various remote locations which may change in the markup. Is there any way of creating a macro or +value:thingie+ that will allow me to refer to images with a a variable prefix? eg: prefix0 ='' prefix1 = 'http://www.mysite.com' +prefix1/images/myimage.png+ vs +prefix0/images/myimage.png+ Lawson _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On 7/8/10 10:25 PM, Lukas Renggli wrote:
> I did something like that for scg.unibe.ch by creating a new > link-type. You can have a look at the class SCGExternalLink in the > package Pier-Site-SCG in http://source.lukas-renggli.ch/unsorted/. > > Lukas > > Thanks much. Lawson _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by LawsonEnglish
On 7/8/10 10:25 PM, Lukas Renggli wrote:
> I did something like that for scg.unibe.ch by creating a new > link-type. You can have a look at the class SCGExternalLink in the > package Pier-Site-SCG in http://source.lukas-renggli.ch/unsorted/. > > Thanks for the reference but I'm confused about many things... First, I don't understand how a new link-type is registered with the system. Secondly, in general, I'm not clear on how to extend the markup system. Are their specific places I should look to get a better understanding of this? Is there some kind of overview of the internal organization of the markup system that will help guide me in how it all works together? Thanks. Lawson _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
> First, I don't understand how a new link-type is registered with the system.
Being a subclass of PRLink is enough. See the class-side of the PRLink hierarchy for details. > Secondly, in general, I'm not clear on how to extend the markup system. Are > their specific places I should look to get a better understanding of this? http://www.lukas-renggli.ch/blog/extendingpierparser > Is there some kind of overview of the internal organization of the markup > system that will help guide me in how it all works together? http://scg.unibe.ch/archive/masters/Reng06a.pdf (Chapter 3) Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Thanks muchly. Got the first part working.
+MyLink: /images/myimage.png|prefix=http://localhost+ The next part is to be able to store multiple prefixes "globally". Any suggestions as to where to put a dictionary of prefixes? As a first pass they would be accessible to anyone, though eventually perhaps read-only unless you have admin privledges. Again, thanks for your help. Lawson On 7/10/10 3:00 AM, Lukas Renggli wrote: >> First, I don't understand how a new link-type is registered with the system. >> > Being a subclass of PRLink is enough. See the class-side of the PRLink > hierarchy for details. > > >> Secondly, in general, I'm not clear on how to extend the markup system. Are >> their specific places I should look to get a better understanding of this? >> > http://www.lukas-renggli.ch/blog/extendingpierparser > > >> Is there some kind of overview of the internal organization of the markup >> system that will help guide me in how it all works together? >> > http://scg.unibe.ch/archive/masters/Reng06a.pdf (Chapter 3) > > Lukas > > _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
What about a dictionary on the class side of your link and an
administration component that provides an editor? However, keep in mind that you need to re-parse the complete site after editing the prefixes, otherwise you might have an inconsistent state. Lukas On 10 July 2010 18:47, Lawson English <[hidden email]> wrote: > Thanks muchly. Got the first part working. > > +MyLink: /images/myimage.png|prefix=http://localhost+ > > > The next part is to be able to store multiple prefixes "globally". > > > > > > Any suggestions as to where to put a dictionary of prefixes? > > As a first pass they would be accessible to anyone, though eventually > perhaps read-only unless you have admin privledges. > > > Again, thanks for your help. > > > Lawson > > On 7/10/10 3:00 AM, Lukas Renggli wrote: >>> >>> First, I don't understand how a new link-type is registered with the >>> system. >>> >> >> Being a subclass of PRLink is enough. See the class-side of the PRLink >> hierarchy for details. >> >> >>> >>> Secondly, in general, I'm not clear on how to extend the markup system. >>> Are >>> their specific places I should look to get a better understanding of >>> this? >>> >> >> http://www.lukas-renggli.ch/blog/extendingpierparser >> >> >>> >>> Is there some kind of overview of the internal organization of the markup >>> system that will help guide me in how it all works together? >>> >> >> http://scg.unibe.ch/archive/masters/Reng06a.pdf (Chapter 3) >> >> Lukas >> >> > > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On 7/10/10 9:51 AM, Lukas Renggli wrote:
> What about a dictionary on the class side of your link and an > administration component that provides an editor? > > There we go. :-) > However, keep in mind that you need to re-parse the complete site > after editing the prefixes, otherwise you might have an inconsistent > state. > > Lukas > Oh yeah, hmmm. Well, at least for now, I'll be happy if it becomes consistent after restarting a saved image. Which I *think* will be the case even with the simplest implementation. Thanks again. Lawson _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
>> However, keep in mind that you need to re-parse the complete site
>> after editing the prefixes, otherwise you might have an inconsistent >> state. >> >> Lukas >> > > Oh yeah, hmmm. Well, at least for now, I'll be happy if it becomes > consistent after restarting a saved image. > > Which I *think* will be the case even with the simplest implementation. I don't think so, at least this is not the default behavior. When you edit a page the wiki-text gets parsed, transformed to a tree of objects and the links get resolved and replaced with object references. When an image is saved and restarted the objects stay there, there is no new lookup going on. Of course it is possible to have a specific link instance that does the lookup dynamically every time it is accessed, but this is not the behavior of SCGLink I think. Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On 7/10/10 12:31 PM, Lukas Renggli wrote:
>>> However, keep in mind that you need to re-parse the complete site >>> after editing the prefixes, otherwise you might have an inconsistent >>> state. >>> >>> Lukas >>> >>> >> Oh yeah, hmmm. Well, at least for now, I'll be happy if it becomes >> consistent after restarting a saved image. >> >> Which I *think* will be the case even with the simplest implementation. >> > I don't think so, at least this is not the default behavior. > > When you edit a page the wiki-text gets parsed, transformed to a tree > of objects and the links get resolved and replaced with object > references. When an image is saved and restarted the objects stay > there, there is no new lookup going on. Of course it is possible to > have a specific link instance that does the lookup dynamically every > time it is accessed, but this is not the behavior of SCGLink I think. > > Hrm again. Well, when I start seeing strange behavior with the links, I'll at least know WHY even if I haven't a clue how to fix it. :-/ Lawson _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by Lukas Renggli
got to a certain stage in my MLink class and tested a page with markup
referring to it. I get a smalltalk error printed on the page with no halos and no way to examine the markup. Nor can I remove the page because the commands aren't showing. How do I remove a page that I can't display? MessageNotUnderstood: UndefinedObject>>at:ifAbsent: Your request could not be completed. An exception occurred. I think I know what my error is. I never reset my MLink class after I added the global dictionary. Even if I can fix it in some way, its still a not-good glitch that a smalltalk error makes a page uneditable/removeable. Lawson _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On Sun, Jul 11, 2010 at 2:41 PM, Lawson English <[hidden email]> wrote: got to a certain stage in my MLink class and tested a page with markup referring to it. I get a smalltalk error printed on the page with no halos and no way to examine the markup. Nor can I remove the page because the commands aren't showing.Load the Pier-OmniBrowser package from the Pier repository. It gives you a PierBrowser tool from which you can edit/delete the offending component/page John
-- http://john-mckeon.us/seaside _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
You can also go to the parent page, and invoke Browse. This will then
list all children with links related to commands for each page, including (r) from removal. Doru On 11 Jul 2010, at 22:59, John McKeon wrote: > > On Sun, Jul 11, 2010 at 2:41 PM, Lawson English <[hidden email]> > wrote: > got to a certain stage in my MLink class and tested a page with > markup referring to it. I get a smalltalk error printed on the page > with no halos and no way to examine the markup. Nor can I remove the > page because the commands aren't showing. > > How do I remove a page that I can't display? > > Load the Pier-OmniBrowser package from the Pier repository. It gives > you a PierBrowser tool from which you can edit/delete the offending > component/page > John > > > MessageNotUnderstood: UndefinedObject>>at:ifAbsent: > > Your request could not be completed. An exception occurred. > > > > I think I know what my error is. I never reset my MLink class after > I added the global dictionary. Even if I can fix it in some way, its > still a not-good glitch that a smalltalk error makes a page > uneditable/removeable. > > > > Lawson > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > > > > -- > http://john-mckeon.us/seaside > _______________________________________________ > Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- www.tudorgirba.com "Every successful trip needs a suitable vehicle." _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |