Hi,
at the moment I'm thinking about a new project. The project will need a Web API to communicate with an iphone. To me it is quite obvious to implement the API part as a request handler. But when it comes to generation of e.g. XML I'm not sure what is the best way to do.
Sure, the seaside way to do it is to create my own canvas and every object needs to draw itself onto the canvas. But then I have magritte and a lot could be done automatically. Using xpath in the descriptions I could use Pastell to deserialize objects. To produce the output there could be a similar way. This would be some kind of XML binding then.
I wanted to ask if there is anything already available that could help me on my way or if there dedicated ideas how to solve this in seaside.
thanks in advance,
Norbert
Pier Group,
For a small site, I have a list of the item costs and the day:
|! Date | ! Cost of Item 1 |! Cost of Item 2
| 2010-Feb-11 | $2.50 | $2.25
| 2010-Feb-10 | $2.45 | $2.23
| 2010-Feb-9 | $2.41 | $2.26
| 2010-Feb-8 | $2.52 | $2.24
My customer is perfectly happy entering the text each day, however he wants a line graph showing the rise and fall of the two items for the last few weeks. Is there anything in pier which will display this sort of data? Maybe something in Squeak/Pharo which would generate a morph, that can be turned into a jpg?
Thanks,
John
I brought up the topic twice already. There is always a few months in between. The topic back then was the parameterization of component links when embedding them into a pier page.
The first problem did Lukas already solve. If I provide a description with parameterName in my component I can get the parameterValue in my component. A
MyMaComponent class>>descriptionChild
^ MAStringDescription new
parameterName: 'child';
accessor: #child;
label: 'Child component';
priority: 100;
yourself
enables me to specify
+mycomponent|child=title+
on a page and the component will get the "title" value through the child: setter. That is really nice. But the origin of my problem is a step further. In my last project I had big trouble accomplishing the wanted design by using renderers and componentClasses. I wanted to have a more freely doable design.
So the idea was to have a wrapper component around a MAContainerComponent that has the child description. With the child parameter I could select the child of the internal MAContainerComponent to display. Unfortunately the component mycomponent I get by doing
+mycomponent|child=title+
+mycomponent|child=abstract+
are not the same on one page. Is there a way to specify that I want to use the identical component if the embedded label (mycomponent) is the same? May I did something wrong but I always get different objects and it does make sense to me . Would be nice if this would bedoable. Otherwise I guess I need to do my own component-per-page-cache.
Any hints appreciated as always.
Norbert
Hi,
I'm trying to do in-place editing on Pier pages (or rather I want to
use pier wiki markup in user comments in my app). Has anyone done
something like that before? I am using the seaside 3.0 one-click
image.
I can do in-place editing with 'normal' text, the problem with pier
seems to be that the text that you want to edit (pier's wiki source)
is different from what you have on the displayed page (the HTML
rendering of the wiki text).
The Scriptaculous documentation mentions this:
http://wiki.github.com/madrobby/scriptaculous/ajax-inplaceeditor
How to edit server side formatted text (formatted with eg. textile)
Format the text on the server when the initial page is rendered. Add a
new server side action that returns the unformatted text in the
reponse and specify the load Text URL? option as a URL to this action.
The control will load the text from the server instead of using the
text on the page. The action that receives the updated text should
save it and return the formatted text as an HTML snippet in the
reponse.
The relevant option in Scriptaculous Ajax.InPlaceEditor is
loadTextURL V1.5 null Will cause the text to be loaded from
the server (useful if your text is actually textile and formatted on
the server)
Now I see nothing related to this in SUInPlaceEditor.
Do you have any hints how this combination of in-place editing and
wiki markup could be done?
Thanks in advance
Matthias
Hi,
I know that a PRDocument is a tree of objects that correspond to the
structure of a HTML document, such as paragraphs (PRParagraph), list
items (PRListItem) etc. When I edit an existing wiki page, where does
the raw wiki text come from? Is it re-generated from the objects
inside the PRDocument (how?), or is it kept somewhere in a separate
place?
Thanks
Matthias
Hi folks.
We were discussing about this in the Pharo mailing list but the idea is for
all Smalltalkers. I am not sure if this will work, but it is worth to try it
as I don't have anything to loose.
We were thinking to have a place, an environment and hopefully a community,
where we can freely discuss about Smalltalk papers or OO in general. All
smalltalkers of all flavors can join, discuss, tell their experiences and
thoughts, share and learn.
The main purpose about that list is:
- be able to FREELY discuss about papers about Smalltalk or OO in general. I
say freely because maybe someone gives an opinion of a paper that the person
who wrote it is also in this place. We are all professional and I think we
can discuss with respect.
- LEARN.
Other uses:
- Don't reinvent the wheel. Maybe I wanted to do something and I read that
XXX person did YYY. So, I can look at it.
- Be aware of what other people is doing, working, writing and learning.
- Have different opinions of a certain topic / paper.
- A little step to join all the Smalltalk community in one place. We can
meet people, join forces, etc.
- Help in the preparation, ANN, collaborate, etc in Workshops, conferences,
and so on.
- Ask for help on review. Several times someone has several papers to review
for a certain conference. This can be a place to ask for that help.
- Publish papers that were rejected from someone. How many times some papers
where rejected but do you still read it and find it useful ?
- Educate people and being educated.
- Share latex template, commands, or tricks related to smalltalk code for
example.
- Discuss about research in general.
- Ask for a certain topic. Suppose I want to start to work in XXX topic, I
can ask to see if someone knows related papers or work.
- others
In two words: DISCUSS AND LEARN.
FAQ:
1) Which is the address?
http://groups.google.com/group/smalltalk-research
2) Do I need to be "Researcher" to join ?
Not necessary. You may just be interested.
3) Is there a Nabble interface?
Yes: http://n4.nabble.com/Smalltalk-Research-f1473466.html
Now, please what I would appreciate is if you can help me to you distribute
(I am not in Gemstone, Cincom or GNU for example) this ANN. It would be cool
to create a community. I know there are a lot of Smalltalk researchers that
doesn't have time to follow the active smalltalks lists. If you can send
private mails to them would be fantastic!
Thank you very much.
Mariano
Hi,
I want to add some attributes to a generated embeded link (an image I'm
embedding)... for instance, I want to say something like this:
+style:'width: 500px' myImage+
is there a way to do something like this?
Cheers,
Esteban
Hi:
I installed (using the Metacello configuration) the Seaside 3.0 and
migrated one of my applications.
Now, playing with the new Pier 2:
1. Reading this list I managed how to configure and setup, but I can't
make it show the look of the
older version nor the possibility of change to the old Events look.
These features are not availables?
2. I want to add an own seaside component on a Pier page, but the
combo to select only show the
examples and so.....how I can add to this list my own seaside components?
Thanks.
--
=================================================
Germán S. Arduino <gsa @ arsol.net> Twitter: garduino
Arduino Software & Web Hosting http://www.arduinosoftware.com
PasswordsPro http://www.passwordspro.com
=================================================
First let me assume that WAKomEncoded is what I should be starting, versus WAKom ?
Us old Smalltalkers remember starting WAKom so in WikiServer startup that is what happens.
I *guess* it really should be WAKomEncoded?
So what's the fall out, I mean I can stuff UTF8 chars into PRPages... Happy Happy.
Well not quite, I got a support email out of South Korea that the UTF8 character that was entered for the
Page title was being mangled. In fact if they use the *wrong* character the app would hang as it's loading
from binary storage to instantiate the PRPage.
In looking at this it turns out that because WAKom is used, the UTF8 data from the request is being passed
as a String into PRStructure (instance var name). Later lazy initialization is used to populate title
title
"Answer the title of the receiver, essentially the name but starting uppercase."
^ title ifNil: [ title := self name capitalized]
Now here is the bad part, the capitalized runs Character>>asUppercase which actually is kinda unicode aware
so it's attempting only to deal with wide characters but since the UTF8 character is multiple bytes in a String then it mangles
the first byte to uppercase thus destroying the meaning of the UTF8 sequence.
However now if I restart with WAKomEncoded the squeak to utf8 process then messes the UTF8 data that was
stored in the binary data file.
So thoughts on how to fix things when I load the PRPages from storage, and what fields would need fixing are welcome
--
===========================================================================
John M. McIntosh <johnmci(a)smalltalkconsulting.com> Twitter: squeaker68882
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
I've been writing a couple of Pier components, let's call them
StructureA and StructureB (both subclassed from PRStructure), and each
has a corresponding view (answered by #viewComponentClass), ViewA and
ViewB (subclassed from PRDefaultView).
Now I find I want to embed a 'B' inside of an 'A', so that ViewB gets
rendered inside of ViewA.
I've added a StructureB instance as a child of the StructureA instance.
What I can't figure out is, from within ViewA>>renderContentOn:, how do
I go about getting hold of an instance of ViewB, so that I can pass it
as an arg to "html render: ... " ?
(I could instantiate ViewB myself, but presumably I would at a minimum
have to set the context ivar to something, but I know not what.)
Or am I going about this the wrong way?
Cheers,
Nick Brown