Manuel Holtgrewe | 1 Jul 01:08 2003

Re: vardump or print_r

Hi

As far as I understood Jason, he wanted a simplified print_r that is
to generate a simple output from a node tree. I'd like something like
this, too. It would help you to debug your ndf files and custom created
trees:

  App (class: "binarycloud.core.App", id: "page", tmpl: "user.app.web.tmpl.MainPage")
    App (class: "user.app.some_form.MyForm", id: "sampleform")
      App (class: "binarycloud.form.FormElement", id: "some_input")
        Widget (class: "binarycloud.form.ErrorWidget", id: "error")
        ...
    Widget (class: "user.app.counter.DisplayCounter", id: "counter")
    ...

Maybe some graphic output was nice, too, but IMHO something like this
above is sufficient. When there is a bc ide, this could be some fancy 
tree widget that is used to visualize the Node tree.

*m

--

-- 
Unix definitely is a user friendly operating system.
- It is only picky with its friends.
Manuel Holtgrewe | 1 Jul 01:19 2003

Re: Entity definition format

Hi

> > * If Client was an Entity, there would be no way to store the policies
> >   in the base entity class. How could we solve this? Should you create
> >   a class that extends Client and provides properties for the policies
> >   or other data you want to store for the Client - but only in the
> >   session?
> 
> Eghfu? Whaddumean oh, I get it. Like auth override. We can probably handle
> that without problems.

But I am afraid I cannot follow you here ;-) I mean the following: The
base entity "Client" has exactly the fields "id", "username",
"password_hash" and "role".

At the moment, the Client class has additional properties like
"policies", "client_software", "remote_host". If we only wanted to store 
the information described in the paragraph above this one we would not
face any problems. However, we have at least to store the policies in
the Client instance - even if it is not stored anywhere. How should we
realize this?

A solution was to seperate the login data/role and additional
information from each other: The class User extends Entity and stores
the id, username etc. The class Client is associated to exactly one 
User Entity and contains other fields (semi abstract and syntactically
correct notation follows ;-):

  User := (ID, username, password_hash, role)
  Policies := [policy array] (how 2 store in Entity, anyway?)
(Continue reading)

Jason Hines | 1 Jul 01:24 2003

Re: vardump or print_r


That is _exactly_ what Justin and I were imagining as being very useful 
as well.  Perhaps with a expand/collapse icons beside each branch, since 
   the tree has the potential to grow quite large.

jason

Manuel Holtgrewe wrote:
> Hi
> 
> As far as I understood Jason, he wanted a simplified print_r that is
> to generate a simple output from a node tree. I'd like something like
> this, too. It would help you to debug your ndf files and custom created
> trees:
> 
>   App (class: "binarycloud.core.App", id: "page", tmpl: "user.app.web.tmpl.MainPage")
>     App (class: "user.app.some_form.MyForm", id: "sampleform")
>       App (class: "binarycloud.form.FormElement", id: "some_input")
>         Widget (class: "binarycloud.form.ErrorWidget", id: "error")
>         ...
>     Widget (class: "user.app.counter.DisplayCounter", id: "counter")
>     ...
> 
> Maybe some graphic output was nice, too, but IMHO something like this
> above is sufficient. When there is a bc ide, this could be some fancy 
> tree widget that is used to visualize the Node tree.
> 
> *m
> 

(Continue reading)

Alex Black | 1 Jul 01:38 2003

Re: Entity definition format

> At the moment, the Client class has additional properties like
> "policies", "client_software", "remote_host". If we only wanted to store
> the information described in the paragraph above this one we would not
> face any problems. However, we have at least to store the policies in
> the Client instance - even if it is not stored anywhere. How should we
> realize this?

Oh, I see.

Somewhere else. Or something that extends the base client entity. :)

> A solution was to seperate the login data/role and additional
> information from each other: The class User extends Entity and stores
> the id, username etc. The class Client is associated to exactly one
> User Entity and contains other fields (semi abstract and syntactically
> correct notation follows ;-):

> User := (ID, username, password_hash, role)

Uh huh

> Policies := [policy array] (how 2 store in Entity, anyway?)

Wouldn't ever want to store in entity.

> ClientInformation := (UserAgent, RemoteAddress)

Session?

> Client := (User, Policies, ClientInformation)
(Continue reading)

Alex Black | 1 Jul 01:39 2003

Re: vardump or print_r

I have a bit of JS which we can use that works beautifully for this purpose.

Someone gets me the array, I'll make the smarty to make it look really cool

_a

> 
> That is _exactly_ what Justin and I were imagining as being very useful
> as well.  Perhaps with a expand/collapse icons beside each branch, since
>  the tree has the potential to grow quite large.
> 
> jason
> 
> 
> Manuel Holtgrewe wrote:
>> Hi
>> 
>> As far as I understood Jason, he wanted a simplified print_r that is
>> to generate a simple output from a node tree. I'd like something like
>> this, too. It would help you to debug your ndf files and custom created
>> trees:
>> 
>>   App (class: "binarycloud.core.App", id: "page", tmpl:
>> "user.app.web.tmpl.MainPage")
>>     App (class: "user.app.some_form.MyForm", id: "sampleform")
>>       App (class: "binarycloud.form.FormElement", id: "some_input")
>>         Widget (class: "binarycloud.form.ErrorWidget", id: "error")
>>         ...
>>     Widget (class: "user.app.counter.DisplayCounter", id: "counter")
>>     ...
(Continue reading)

Jason Hines | 1 Jul 05:41 2003

Re: Questions on form


Actually, after working with Form a bit more..  I'm finding that in most 
cases, we will _not_ need to be extending Form, unless you want to add 
some additional control to the form.  Though for normal form submission 
use, you can simply set path="binarycloud.core.Form" with children form 
elements to provide a completely working, validating, filtering form.

Here is a quick demonstration of how I'm using it in some case.

I have a form definition, which really is a normal NDF.

<node:definition id="form_id" path="binarycloud.core.Form">
  <children>
    <node:definition id="elem_id" path="binarycloud.form.FormElement">
     <children>
       <node:definition id="input" path="binarycloud.form.TextInput" />
       <node:definition id="input" path="binarycloud.form.Error" />
  ...etc

So then, in my App.. I have:

class MyApp extends App {
   var $form;
   function Init() {
     $this->form =& $this->SetupChild('path.to.that.form.def');
     $this->_InitChildren();
   }
   function Main() {
     if ($this->form->GetState()==FORM_COMPLETE) {
       // form success, print values
(Continue reading)

Manuel Holtgrewe | 1 Jul 13:11 2003

Re: vardump or print_r

Hi

On Mon, Jun 30, 2003 at 04:39:09PM -0700, Alex Black wrote:
> I have a bit of JS which we can use that works beautifully for this purpose.
> 
> Someone gets me the array, I'll make the smarty to make it look really cool

Hm, I have got a Node for this but it seems that it is not executed.
Jcm, how can I pass parameters to Nodes dynamically? I want to do
something like:

  // sample form
  $SampleAuth =& Node::GetPage('user.app.website.ndf.SampleAuth');
  echo $SampleAuth->GetOutput();

  // debug
  $Debug =& Node::GetPage('binarycloud.debug.ndf.Debug');
  $Debug->_owned_list["NodeDump"]->SetNode($SampleAuth);
  /*
   * Execute Main() methods of Node and children here
   */
  echo $Debug->GetOutput();

Regards,

    Manuel

--

-- 
Unix definitely is a user friendly operating system.
- It is only picky with its friends.
(Continue reading)

Jean-Christophe Michel | 1 Jul 13:42 2003

Re: vardump or print_r

Le mar 01/07/2003 à 13:11, Manuel Holtgrewe a écrit :
> Hm, I have got a Node for this but it seems that it is not executed.
> Jcm, how can I pass parameters to Nodes dynamically? I want to do
> something like:
> 
>   // sample form
>   $SampleAuth =& Node::GetPage('user.app.website.ndf.SampleAuth');

Use getPage only if it's the top node and you call it from htdocs/ file.

>   // debug
>   $Debug =& Node::GetPage('binarycloud.debug.ndf.Debug');
>   $Debug->_owned_list["NodeDump"]->SetNode($SampleAuth);

You cannot do that. GetPage already calls Main, you cannot call it
twice... You would like to do GetNode maybe rather than getPage.

Said differently, you cannot alter the top node dynamically. Do it in a
class (Init) or in the ndf.

SetNode is not a node method.
But I cannot see the interest in doing 
$obj =& GetNode(ndf);
$another->SetNode($obj);

Rather do

$another->AddChild(ndf);

--

-- 
(Continue reading)

Manuel Holtgrewe | 1 Jul 16:25 2003

Re: vardump or print_r

Hi

The problem is that I do not want to add a child but to set the node
that I NodeDump to dump. Is it impossible to pass this into a Node? If
it is: Shouldn't it be possible?

*m

--

-- 
Unix definitely is a user friendly operating system.
- It is only picky with its friends.
kamel | 1 Jul 16:41 2003

ent2schema.xsl

Hi,

I tried to build the Work schema from the ent2schema.xsl using this command:

xsltproc ent2schema  ../../../user/samplesite/app/website/edf/Work.edf.xml

I really don't understand the answer. It seems to be exactly the content 
of the Work.edf.xml

Is there someone who could tell me why ?

Kamel.

Gmane