cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

fun-stration with oid traversal flags...

JasonBuss
1-Newbie

fun-stration with oid traversal flags...

Hi everyone,



To those currently at PTC user, please harass everyone you can get a
hold of for better documentation of the oid traversal flags 🙂



Anyway, I was working on a function that was attached to the save on a
doc_add_callback to traverse the oid tree and change an attribute value
on any element that tested positive for oid_modified. I was stumped at
first until the oid traversal email came through.



I'm getting pretty close, but one last hitch has me stumped; I have a
funny feeling I'm missing something trivial...



Anyway, the problem is the traversal flag works, except it now thinks
that every child of oid_root() is a modified element. Not where I was
hoping to go with that.



Here's the code...



function rev_update(doc,op) {

if(op == 1) {

local flag = 0x4 | 0x8 | 0x10 | 0x20 | 0x80 | 0x100 | 0x200 |
0x400



local curr_rev=oid_attr(oid_root(),'revlevel');

ret = oid_xpath_nodeset(oid_root(),element,'//*');

for(e in element) {

local oid = oid_child(element[e], 1, flag);

while(oid_valid(oid,flag)) {

if(oid_modified($element[$e], flag)) {


$att_chg=oid_modify_attr($element[$e],'revlevel',$curr_rev)

}

oid = oid_forward(oid, flag)

}

}

}

}



I thought maybe there was a sticky value that was picking up when the
oid_modified was testing, but I can modify the last element in a
document, and it still flags every element that is a child of root.
Any ideas?



Thanks,



-Jason

19 REPLIES 19
lfraley
6-Contributor
(To:JasonBuss)

Hi Jason:

We really missed you this year. It's going to be in the same place again
next year.

It's been a rough year out here. I don't see my company springing for
travel and training here for quite some time...



I was interested to see about the 5.4 release, and if it was still to
include the Active X Editor.



That's good that they're going to start holding TC meetings regularly.
Nice to see some forward momentum there.



I was kinda bummed about not being able to go this year. I got a Wii
over the holidays, so now I'm pretty good at it 🙂



You kids have fun!



-J


Yeah, our travel budget got cut to nearly nothing this year, so I
couldn't go on the company's dime. However, since I only live/work an
hour away from the PTC/User Conference hotel, I did manage to go there
Monday and pay $25.00 out of my own pocket to attend the reception and
see some of my old Adepters acquaintances/friends for a little while.

I didn't notice Paul Grosso or John Dreystadt there, but they might have
been hiding in the PTC rabbit warren in the middle of the vendor floor.

Since it is in the same place next year, I might actually get paid to
attend next time, assuming no more budget squeeze.


PTC is also trying to save on costs, so the development group was
represented this year by Sam Brow. I stayed here in Ann Arbor.



John Dreystadt
Software Development Director
Arbortext - PTC
734-352-2835
-

Yeah, that's one downer about being in Wichita. I think the closest
AUGI/PTCuser has ever come was in Keystone, CO.


Hey Jason--You think you have it bad, see how close they ever came to
Duluth, MN. 🙂



Ed, I'm glad you were able to stop by at least for a day. It was great
seeing you there. I hope next year things are better budget-wise and
you're able to actually come for the whole conference (and do a
presentation, of course). And the same for Jason and the rest of the
folks who wanted to go but couldn't because of the economy.



And just a reminder for the budget-conscious: if you do a presentation,
you don't have to pay the registration fee. So start thinking of ideas
for presentations now. Then you'll be ready when the call for
presentations goes out in the fall.


Mystery solved!


True...



OK, I have my presentation for next year...



"The Script Who Loved Me; the peril and ecstasy of oid traversal flags"



...



"And how would you like your markup, Mr. Bond?"



"Perused, not parsed..."



(Getting ready to take some time off of work, and struggling to stay
focused)



-Jason


I heard a few years ago that the reason they always hold the XML
Conference at a northern city in November or December is to discourage
management from attending. If they held it in Miami or Orlando or
Phoenix or San Diego in November or December, every manager would want
to make it into a boondoggle, and nobody with any actual technical
knowhow would be able to attend.

Although they did hold the XML Conference in Orlando at the Disney Swan
and Dolphin a few years ago. I don't believe they have held it anywhere
near this latitude since, but I haven't been paying attention that
closely.


Hi John,

I wonder when will conferences integrate meetings via the Internet so
the core of the matter can be obtained without spending thousands of
dollars? I'll wager participation would significantly be increased.

Best regards,

John

If you could get the bandwidth for all of the interested parties to log in, I am not sure that you could gain everyone's attention for long enough. Also, I think the vendor booths at the conferences are a significant offset to the cost, if not an actual money-maker. Maybe they could have pop-up advertisements in the middle of your "Gotomeeting" or whatever, window. Or have little commercials at the beginning of a video presentation, "The following is being brought to you by Documentum."
lfraley
6-Contributor
(To:JasonBuss)

Drat! I completely missed Sam. I saw Rick and thought he was the only one
who came.

Liz

lfraley
6-Contributor
(To:JasonBuss)

We're going to do a mini-conference -- "here's what you missed" -- in the
bay area at the end of Oct/early Nov. PTC/User said they'd help us get this
to come together. Keep tuned.

Jason: You need to coordinate with Brian York (Exmark/Toro - Nebraska). He
wants to do something in the midwest.

Liz



Actually, I am wrong. Sam went last year. Rick Mintz went this year.
Sigh, clearly my short term memory is starting to go.



John Dreystadt
Software Development Director
Arbortext - PTC
734-352-2835
-

Can do... Thanks, Liz!



-Jason


lfraley
6-Contributor
(To:JasonBuss)

John,

I hate to tell you, but I think your long term is going too. (Welcome to the
club.) Last year, I clearly remember seeing John Lloyd.

Maybe you or Sam can come next year?

Liz


Yes, it was John Lloyd last year. Sigh, I really am forgetting a lot. Oh
well. The last few years I have had nieces and nephew graduating from
high school at several locations around the country right about the same
time as PTC/User so I have not been able to go. But this year was the
last one, no more to come. So maybe next year.



John Dreystadt
Software Development Director
Arbortext - PTC
734-352-2835
-

John, we look forward to your return!

You, too, of course, Jason!

Top Tags