Lukas, I've uncovered a small bug in MAReportComponent. While the
#renderContentOn: method calls #labelId, that method is not
implemented in the class hierarchy. I'm not sure if the
implementation from MAElementComponent should be moved up, or if
something else was intended for the report hierarchy. For reference,
this is in package Magritte-Seaside-pmm.206.
--
============================================================
Thomas Koschate
Hi,
I'm playing with custom views in Magritte. I have a model
and overwrote descriptionContainer with my own instance of
MAComponentRenderer.
What I'm trying to achieve is to display a text input the
following:
<label for="anyid">labeltext</label>
<input type="text" id="anyid"..../>
As a quick test I changed the renderLabel: to
renderLabel: aDescription
aDescription hasLabel
ifTrue: [ html
label attributeAt: 'for' put: aDescription hash;
with: [ html render: aDescription label ] ]
I need an id attribute in the <input> tag which has the
same content as the for attribute in the <label> tag.
I don't have a glue how to insert an id attribute to the
renderControl:. Is there a way to add an attribute if I only
have a component. I doubt the component description is the
right place to put.
If I only want to change the behaviour of the text input field,
is it best to overwrite the visitStringDescription?
thanks in advance,
Norbert
Hi
There is now an audioscrobbler[1] plugin for Pier at [2]. Margitte is
used for XML data binding. It makes use of traits so you will need a
Squeak 3.9. And the YAXO XML parser.
Currently supported are:
* Top Artists
* Top Albums
* Top Tracks
* Top Tags
* Recent Tracks
* Recent Banned Tracks
* Recent Loved Tracks
* Weekly Artist Chart
* Weekly Album Chart
* Weekly Track Chart
The Audioscrobbler system is a database that tracks listening habits
and calculates relationships and recommendations based on the music
people listen to.
A screenshot can be found at:
http://img79.imageshack.us/img79/7537/audioscrobblervp6.png
[1] http://www.audioscrobbler.net/
[2] http://mc.lukas-renggli.ch/audioscrobbler/
Cheers
Philippe
Hi,
at the moment I'm playing with magritte to test if it is
suitable for my web application which is done with seaside.
I created a model and I'm able to use it as a component with
seaside. I have a model where ClassA has a 1:m relationship
to ClassB. The exception here is that there is a fixed set
of possible instances for ClassB to choose for the reference
from ClassA.
So what I need on the html rendering side is a kind of a
pull-down and not an extra form for creating new instances of
ClassB.
I read the tutorial.pdf. There are three possibilities mentioned
to customize the views for the model. Unfortunately I didn't
figure out how this is working. The mentioned method defaultContainer
(which should be overridden) doesn't exist in the magritte version
I use. (I is the newest from Monticello)
I even tried to set a new componentClass in the descriptionFoo
class method.But with no effect. I'm not sure what I'm doing
wrong. Magritte seems to ignore every step I take to customize.
What would be the best way to customize on the class or even
better on description instance side?
Why is there an extra componentRenderer? As far as I figured
it out componentRenderer is container dependent. What is the
reason for having a additional method componentRenderer?
What are the best practices for wiring magritte components
together? The only way I found is to use onAnswer:.
thanks in advance,
Norbert
Score with Nanotechnology!
We called it! NSLT is up BIG on huge volume. We
hope you took a position early and are smiling right
now. If you didn't, not to worry. The big spike is
expected also on Wednesday, November 22nd. Get in now!
It is widely predicted that nanotechnology will be the
next booming industry for our economy. Our feature is
in the perfect place at the perfect time.
Company: Nano Superlattice Technology, Inc.
Symbol: NSLT
Price: $0.22(+37%)
Short-Term Target: $0.58
Long-Term Target: $5.50
With the increased miniaturization of personal
electronics devices current tools are reaching their
limits.
Nano Superlattice Technology Inc. is a nanotechnology
company engaged in the coating of tools and components
with nano structured PVD coatings for high-tech
industries.
NSLT uses Superlattice technology to apply multi-layers
of super-hard elemental coatings on an array of
precision products to achieve a variety of physical
properties.
An amazing revelation is set to come out of the Nano
laboratoryes which will have an enormous impact on the
manufacturing world.
Seize the day and get in before the news is out!
---
(CNN) -- Although Congress is unlikely to follow calls from a top Democrat to bring back the military draft, the United States does have a plan, if necessary, aimed at inducting millions of young men for service.
EGG HARBOR TOWNSHIP, New Jersey (AP) -- Autopsies were being conducted Tuesday on four women whose bodies were found in a seedy area just outside Atlantic City.
WASHINGTON (AP) -- NASA's best effort to find a missing Mars space probe failed Monday night, as scientists at the space agency began to lose hope for the 10-year-old planet-mapping workhorse
Hi,
I am real interested in seaside/magritte/pier and as a newbie (in squeak but
not in smalltalk) I would like to do a little Pier/seaside website. I
chose to run my squeak process in a linux server with a framebuffer X
server to administrate my image with VNC access (and not by the seaside
inspector available with halos). I did it with a special user (not root)
and my firewall connection configuration permits me to access externally
to my webserver on standard port 80.
But I am a bit unsecure with a deployment of a "classical" pier
configuration. If my machine crash, I lost all my data. So I need to do
backup. I can run a:
SmalltalkImage current snapshot: true andQuit: false.
but if a user does something on my website, it's rejected. So I read
somewhere (maybe thru this mailing-list archive) about a way to do
backup. Actually, I would like to save the image everytime it's
possible. I heard about the use of:
UnixProcess saveImageInBackgroundNicely but I don't know how to use it.
With forkHeadlessSqueakAndDoThenQuit message, it seems to be possible to
save my image in another until I do the permanent and tested weekly
backup. So if I crash or there is a glitch, my image or the periodically
save image can be broken but I can restore the most recent backup.
If someone can explain me how to do (or find how to do) this, I'll be
glad. I don't want to build a wiki/blog like site and lost in a crash
all the readers'comments/posts.
I also noticed some errors in the deployment of squeakfoundation.org. By
clicking on 'Edit' or 'Login', there's error. But instead of permitting
me to go back to the previous page with a short error message (and
advertising the webadmin) like on the other classic php/jsp website, I
go to debug message. It's really bad. I guess that when I click on
'Debug' I open a morph Debugger window on the squeak image. It's not
what I (and probably the squeakfoundation.org webmaster) want. I am sure
there is a way to shortcut the doesNotUnderstand message in seaside/pier
so that in a deployment mode, the user has just a friendly error message
and the webmaster received an email from squeak with the debug message
infos and the context.
So I need your help to try to develop a website with seaside/pier
because I believe in those kind of way to develop websites (I like
servlets too but it's ugly, heavy and I prefer smalltalk as I used
smalltalk or ObjectiveC during the most important part of my life as a
programmer). I thought that I just can develop component and toggle the
deployment preference tag to true, to have a ready-to-use website but
there are missing things. As I said before:
+ how to save in one or two temporary images without stopping the
working pier site? and without going (as I do now) in config page (the
only place when I said 'deployment' to false) to toggle halos and then
to have an inspector which permits me to manually save (I know Lukas did
so too but it's not a good way). There's database way too for
persistence and I will probably look at Magma/REServe and something like
that. I think there are smalltalk that can save multiimage (visualworks
can do this I guess) and it could be a good option that squeak do that
too.
+ how to build a beautiful debug messages to a secure and friendly
deployment? The example of the squeakfoundation.org website is a
horrible one. As with the 'Toggle Halos' button in the
oops-i-didnt-see-i-toogle-deployment-to-false case, it's dangerous and
every visitor can crash or browse in the image without getting the root
seaside admin (that could be nd5 encrypted too).
I hope you will have answers.
Very thanks for reading this a-bit-too-long mail,
--
Martial
Hi Christophe,
> I make my model and view package. But now I am lost…how I can run
> this… I see in your tutorial the line below to have seaside interface:
>
> result := self call: (aModel asComponent addValidatedForm; yourself).
>
> But I am block.
This code looks ok and should work fine.
The whole part within the brackets is Magritte, the rest is plain
Seaside. So depending on why you are blocked, you might want to check
out different resource:
- If it is the Magritte part, you can read my master thesis [1] and
or re-ask the question in the Pier, Magritte mailing list [2].
- If it is the Seaside part that poses the problem, you might want to
check out my Seaside tutorials [3] or re-ask the question in the
Seaside mailing list [4].
Cheers,
Lukas
[1] http://www.iam.unibe.ch/~scg/Archive/Diploma/Reng06a.pdf
[2] http://www.iam.unibe.ch/mailman/listinfo/smallwiki
[3] http://www.lukas-renggli.ch/smalltalk/seaside/tutorial
[4] http://lists.squeakfoundation.org/cgibin/mailman/listinfo/seaside
--
Lukas Renggli
http://www.lukas-renggli.ch
> Thanks, glad it's useful. As for beRequired, you got me there, no clue,
> maybe someone else will chime in with the answer.
The latest version of Magritte (Magritte-All-lr.179 or later) has
properties to set the error text for specific error, e.g.
#conflictErrorMessage:, #kindErrorMessage:, #multipleErrorsMessage:,
#requiredErrorMessage: and #rangeErrorMessage:.
The latest version of Pier also makes use of this new feature and now
displays much nicer error messages.
Note that you are required to load Seaside2.7 to use this version of Magritte.
Hope this helps,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
2006/11/11, florent trolat <trolat.florent(a)laposte.net>:
> Hi,
>
> I need, for my seaside application, security and authentification.
> I've seen PierSecurity and Spielverder. This 2 packages will be very
> usefull if I success tu use one without pier.
> What's your feeling about this?
> Do you think it's possible to reuse Spielverder without pier for example?
>
> maybe you know other security/authentification packages?
I'm not really sure how much can be reused besides the general ideas
behind it. I only know Spielverderber but I don't think the situation
is much different for Lukas' package.
The model makes the general assumption that we have commands that
operate on a structure.
There is a user class, a group class, some special group and user
classes that you probably don't want and a command group class.
Besides there is a list class, a list item class and some methods to
find an item in the list.
That was it, the rest is Pier specific.
Philippe
Anyone know if it's possible, to take descriptions from several objects and
display them on the screen all at once?
For example, say I have a Customer object with an addresses collection. But
one data entry screen, I want to flatten it so that the first address in the
collection shows up as fields on the customer form, but the model still
keeps them as separate objects and each field still writes to it's original
model. I looked through Lukas's thesis but didn't see anything.
I was thinking I could override description on the instance side, and add
All the subcomponents descriptors to the main description, but I don't see
how it'd get bound to the subcomponent as it's model.
Ramon Leon
http://onsmalltalk.com