Due to enormous amounts of spam, the forum has been set to read-only mode.



Reply to topic  [ 10 posts ] 
Another GUID Question 
Author Message

Joined: Thu Jul 31, 2003 8:21 pm
Posts: 1433
Post Another GUID Question

When passing a GUID to GenerateHTMLListPage, do we pass it with the curly braces and dashes (just like we got it from the call to GenerateHTML)? I keep getting an "invalid GUID" error.

- Jeff


Mon Aug 17, 2009 9:26 pm
Profile
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Another GUID Question

JSonnabend1 wrote:
When passing a GUID to GenerateHTMLListPage, do we pass it with the curly braces and dashes (just like we got it from the call to GenerateHTML)

You should always use the GUID as it is returned by GenerateHTML (including curly braces and dashes).

Quote:
I keep getting an "invalid GUID" error.


That is strange. This works fine here:

Code:
var
  Filter: String;
  Filename: String;
  XSLTemplate: String;
begin
  C := CreateOleObject('CATraxx.DataServer');
  XSLTemplate := 'AlbumList.xsl';
  Filter := 'Format=CD';
  Filename := 'h:\list_p1.html';
  C.GenerateHTML(XSLTemplate, Filter, False, Filename, RecordSetGUID);
  Filename := 'h:\list_p2.html';
  C.GenerateHTMLListPage(RecordSetGUID, 2, Filename);
end;

_________________
Fredrik Nordbakke
www.fnprg.com


Tue Aug 18, 2009 11:14 am
Profile WWW

Joined: Thu Jul 31, 2003 8:21 pm
Posts: 1433
Post Re: Another GUID Question

Of course it's strange. Everything I seem to do with this project is strange. :wink:

Any ideas how I can start debugging this?

- Jeff


Tue Aug 18, 2009 2:03 pm
Profile
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Another GUID Question

JSonnabend1 wrote:
Of course it's strange. Everything I seem to do with this project is strange. :wink:

Any ideas how I can start debugging this?

- Jeff

Does the code above work?

_________________
Fredrik Nordbakke
www.fnprg.com


Tue Aug 18, 2009 2:11 pm
Profile WWW

Joined: Thu Jul 31, 2003 8:21 pm
Posts: 1433
Post Re: Another GUID Question

I know I tried late binding, but I don't remember what the code looked like exactly. I haven't re-tried, which I will do later.

- Jeff


Tue Aug 18, 2009 2:30 pm
Profile

Joined: Thu Jul 31, 2003 8:21 pm
Posts: 1433
Post Re: Another GUID Question

Um, GUID is case sensitive?

- Jeff


Tue Aug 18, 2009 5:01 pm
Profile
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Another GUID Question

JSonnabend1 wrote:
Um, GUID is case sensitive?

- Jeff

Yes.

_________________
Fredrik Nordbakke
www.fnprg.com


Wed Aug 19, 2009 7:35 am
Profile WWW

Joined: Thu Jul 31, 2003 8:21 pm
Posts: 1433
Post Re: Another GUID Question

Yes, I found that out. The "string" GUID is actually a (really long) hex number. Case shouldn't matter. Anyway, am I right that it's always all caps? That's what I've seen and my code relies on that fact. Please tell me if I'm wrong about this.

I'm just about done with the basics of the server (I only have searches left to handle). After that, it's on to some more advanced stuff like handling play, playall, cmd's, etc., and then maybe tackling SqueezeCenter (or Slimserver or whatever Logitech is calling it today).

Thanks for all the help, guys.

- Jeff


Wed Aug 19, 2009 1:36 pm
Profile
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Another GUID Question

JSonnabend1 wrote:
Yes, I found that out. The "string" GUID is actually a (really long) hex number.

That is correct.

Quote:
Case shouldn't matter.

It does matter if you change the case before callling GenerateHTMLListPage (but you don't do that?).

Quote:
Anyway, am I right that it's always all caps?

Yes.

_________________
Fredrik Nordbakke
www.fnprg.com


Wed Aug 19, 2009 2:20 pm
Profile WWW

Joined: Thu Jul 31, 2003 8:21 pm
Posts: 1433
Post Re: Another GUID Question

I understand that it matters if I change the case, but that's because of the CATraxx implementation. CATraxx compares GUID's on a case sensitive basis.

A GUID is a hex number, and so case should be irrelevant (i.e., ff=FF same as 255=255). Because CATraxx, treats it as a string (as it should due to its length), FF<>ff. But from a programmer's perspective, ff=FF, and the GUID 6ec5f01c-aac6-473f-80f6-8473744ebd19 is equal to 6EC5F01C-AAC6-473F-80F6-8473744EBD19.

It's an academic point. I'm not suggesting you change anything in your code. Life is good now that I understand the string vs. hex issue. For all my snags, I'm having fun with this project. Hopefully, I'll have some code to share sometime after I'm back from vacation at the end of the month.

- Jeff


Wed Aug 19, 2009 3:13 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.