INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Create Field - Source Code For MC12 And VB6 (Sample)  (Read 15068 times)

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Create Field - Source Code For MC12 And VB6 (Sample)
« on: March 25, 2007, 06:08:15 pm »

Someone Asked Me How To Create A Field In The JRiver SDK This Is A VB6 Sample, Along With VB6 Source Code.

I Hate .Net

You May Need To Tell MC Plug-In Manager To Show It



Install Plug-In:

http://www.spartasoftware.com/MC-Plugins/12/Create%20Field/Create%20Field.exe

VB6 Source Code:

http://www.spartasoftware.com/MC-Plugins/12/Create%20Field/Source%20Code/Create%20Field.Zip

The Code

Code: [Select]
Public g_MC As MediaCenter.MCAutomation
Option Explicit
Dim MyBAllowEdit As Boolean
Dim MyBSaveInTag As Boolean

Public Function Init(ByVal MediaCenter As Object)
    On Error Resume Next           '
    ' set the global Media Jukebox object on init                    '
    ' (Media Jukebox will call this function when the plugin starts) '
    Set g_MC = MediaCenter
End Function
Private Sub CreateFieldCMD_Click()
    On Error Resume Next
    CreateFieldSub FieldNameTXT.Text, DisplayFieldNameTXT.Text
   
End Sub
Private Sub CreateFieldSub(MyStrFieldName As String, MyStrDisplayName As String)
    On Error GoTo ErrHdlr
    If Option1(1) = True Then
        MyBAllowEdit = False
    Else
        MyBAllowEdit = True
    End If
    If Option1(3) = True Then
        MyBSaveInTag = False
    Else
        MyBSaveInTag = True
    End If
    '
    Dim MCCreateField As IMJFieldsAutomation
    Set MCCreateField = g_MC.GetFields
    MCCreateField.CreateFieldSimple MyStrFieldName, MyStrDisplayName, MyBAllowEdit, MyBSaveInTag
    MsgBox ("Field Created")
    Exit Sub

ErrHdlr:
    MsgBox ("Error Creating Field")

End Sub
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #1 on: March 26, 2007, 01:04:54 pm »

Actually I Don't Think This Is Working All That Good...

JRiver - Is Not bAllowEdit And bSaveInTag Boolean?

If It Is, Then there Is Something Wrong With The SDK

Where Edit Field Works But SaveInTag Does Not
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #2 on: March 26, 2007, 05:16:59 pm »

Actually I Don't Think This Is Working All That Good...

JRiver - Is Not bAllowEdit And bSaveInTag Boolean?

If It Is, Then there Is Something Wrong With The SDK

Where Edit Field Works But SaveInTag Does Not

Agreed

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #3 on: March 26, 2007, 05:20:13 pm »

i take it you have the same results
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #4 on: March 26, 2007, 05:23:41 pm »

Yup =)  You'd think we were using the same SDK or something ;-)

I've added a link to your code to the sticky post btw.

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #5 on: March 27, 2007, 02:58:41 pm »

Can you be more explicit? I created a field, with bSaveInTag true, and it saved it in the tag part of the file...

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #6 on: March 27, 2007, 04:13:17 pm »

If you create a field with bSaveInTag set to true,
then go to options and look at the library field,
the tick box isn't checked saying that it will be stored in the tags where possible.

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #7 on: March 27, 2007, 04:48:21 pm »

If you create a field with bSaveInTag set to true,
then go to options and look at the library field,
the tick box isn't checked saying that it will be stored in the tags where possible.

Correct

Edit: As In A Star Trek Show (Voyager) I Seen Today

"We Are Borg, Our thoughts are one"
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #8 on: March 28, 2007, 10:49:34 am »

Sorry, it's working fine for me. Maybe I'm not borgish enough?
Are you using the latest version?

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #9 on: March 28, 2007, 10:59:54 am »

I'm testing on Build 196.
I'm using the .NET script plugin, which still uses the MC11 interface dll,
since I've not got round to updating the .NET  Wrapper assembly as yet.

Since Kings using VB6 though which doesn't use
a wrapper, I doubt it's that.
I used the following code
____________________________________________________
Imports System
' //css_reference System.dll;
' //css_reference MediaCenter.dll;
Module Script       
   
    Sub Init( mediaCenterInterface as MediaJukebox.MJAutomation, outputTextBox as object)
                 
        CreateFieldSub(mediaCenterInterface, "TestField", "TestDisplayName", true, true)
       
    End Sub     
   
    Private Sub CreateFieldSub(ByVal mediaCenterInterface as MediaJukebox.MJAutomation, ByVal MyStrFieldName As String, ByVal MyStrDisplayName As String, ByVal MyBAllowEdit As Boolean, ByVal MyBSaveInTag As Boolean)
        Dim MCCreateField As MediaJukebox.IMJFieldsAutomation
        MCCreateField = mediaCenterInterface.getfields
        MCCreateField.CreateFieldSimple(MyStrFieldName, MyStrDisplayName, MyBAllowEdit, MyBSaveInTag)
    End Sub

   
End Module
________________________________

Then went to the Configure Library Field Area.
And here's what came up.

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #10 on: March 28, 2007, 11:23:26 am »

Your true value isn't anything peculiar I take it?
The field MyBSaveInTag is coming up as an integer.

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #11 on: March 28, 2007, 12:10:45 pm »

Anything non-zero is true.

I've stuck a logging line in to make sure the right value is getting passed. When the next version comes out, give it a try and post the SDK log here.

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #12 on: March 28, 2007, 05:32:44 pm »

The results are in....

0054304: 4348: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0054304: 4348: SDK: CMJFieldsAutomation::CreateFieldSimple: Save In Tag: TRUE
0054320: 4348: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (16 ms)

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #13 on: March 28, 2007, 05:55:38 pm »

And you double-checked to make sure the box isn't checked (in the display box showing the field details), right?

j

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #14 on: March 28, 2007, 06:04:06 pm »

The Log States True

But The Box Is Not Checked

PS: Sue Is Resting In The Hosp Overnight, I Just Got Home.

I Hope I Can Bring Her Home Tomorrow.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #15 on: March 28, 2007, 06:07:18 pm »

And you double-checked to make sure the box isn't checked (in the display box showing the field details), right?

j


Yup, and it's Exactly the same as shown in my screenshot above,
for the previous run.

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #16 on: March 28, 2007, 06:14:33 pm »

It kind of reminds me of the commercial where the guy is flipping the switch to see what it goes to, but the wife said nope it's not working.

Two houses down the street the garage door is opening and closing on the hood of this ladies car.

Maybe True turns on and off the wrong switch
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #17 on: March 28, 2007, 08:23:25 pm »

But it is working for me... I'll put some more logging in tomorrow, we'll track it down eventually.

King - best wishes for you and Sue...

j

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #18 on: March 29, 2007, 06:08:44 am »

I slept with my dogs last night, they kept licking me, Climbing on me, and stepping on my head when I was sleeping.

They were happy

0062797: 2892: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0062797: 2892: SDK: CMJFieldsAutomation::CreateFieldSimple: Save In Tag: TRUE
0062797: 2892: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #19 on: March 29, 2007, 12:04:22 pm »

Quote
King - best wishes for you and Sue...

She Is Home Now, Walking Like She Has Been Riding A Horse 24\7 For A Week.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #20 on: March 29, 2007, 01:56:27 pm »

Figured it out: when the field already existed with the bSaveInTag being false, creating it would ignore the true value.
Fixed in the next build.

Hope Sue is walking better now, that sounds really painful...

j

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #21 on: March 29, 2007, 02:19:21 pm »

Quote
Hope Sue is walking better now, that sounds really painful...

As the beatles sang (sort of) She will get by with a little help from her friend (Oxycodone\Acetaminophen & Ibuprofen 800 MG)
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #22 on: March 29, 2007, 08:10:07 pm »

Quote
Figured it out: when the field already existed with the bSaveInTag being false, creating it would ignore the true value.
Fixed in the next build.

Still Not Working...
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #23 on: March 29, 2007, 09:52:41 pm »

I thought I'd fixed it, I'll take another look tomorrow...

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #24 on: April 02, 2007, 03:21:12 pm »

Sorry for the delay, it's been very hectic.

Would y'all try a test or two for me:

Create a brand new field with a brand new name, a name you've never used before. Make sure the bSaveInTag is true. Does it work?

Now do the same thing - again with a brand new name, but bSaveInTag is false. Then without deleting the field, create it with bSaveInTag as true. Does that work?

Thanks,

j

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #25 on: April 02, 2007, 03:47:20 pm »

>> Create a brand new field with a brand new
>> name, a name you've never used before. Make sure the bSaveInTag is

Field: Test89246986901219827910

>> true. Does it work?
No

>> Now do the same thing - again with a brand new name, but
>> bSaveInTag is false. Then without deleting the field, create it
>> with bSaveInTag as true.

Field:Test089703e80972038702

>> Does that work?

No

Code: [Select]
Changed Code:

From:

MCCreateField.CreateFieldSimple MyStrFieldName, MyStrDisplayName, MyBAllowEdit, MyBSaveInTag

To

MCCreateField.CreateFieldSimple MyStrFieldName, MyStrDisplayName, MyBAllowEdit, True

Normally True Was Being Sent by A Option Button This Way I Forced Fed A True

It Still Does Not Work

Code: [Select]
Changed Code:

From:

MCCreateField.CreateFieldSimple MyStrFieldName, MyStrDisplayName, MyBAllowEdit, True

To:

MCCreateField.CreateFieldSimple MyStrFieldName, MyStrDisplayName, MyBAllowEdit, 1

Forcing a "1" Works And The Box Is Checked

I Take It MC12 Is Not Taking the Boolean "True" Or "False" setting


Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #26 on: April 02, 2007, 03:57:17 pm »

Field: Test89246986901219827910

I think you used that name before  ;D

So, if I understand: using the word True in your code fails, but using the number 1 works?

j

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #27 on: April 02, 2007, 04:06:26 pm »

I think you used that name before  ;D

So, if I understand: using the word True in your code fails, but using the number 1 works?

j


This Was with 12.0.202 by the way

Yes "True" Fails, But "1" Works
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #28 on: April 02, 2007, 04:52:57 pm »

Okay, I've added some logging. Unfortunately, it won't be in the next build. Try 205 or later...

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #29 on: April 03, 2007, 10:37:48 am »

Hi King... I thought you might not want to wait for a whole day, so I did a test build (sent via e-mail).

Mr. Chriz if you want in on the fun, let me know...

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #30 on: April 03, 2007, 11:04:01 am »

Sent you a PM

I'm always up for more testing!  ;D
I get the same thing with the 1 for representing true working btw.

Cheers
Chris.

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #31 on: April 03, 2007, 11:28:33 am »

Not sure if this is official but a quick test reveals that in .NET
true has a value of -1
false has a value of 0

Wikipedia reveals the same is the case for VB6.

Actually this seems to me to show a flaw in the .NET framework.
A boolean value shouldn't be seen to have an integer value in a modern
bubble wrapped coding system like .NET.

Technically it will have behind the scenes, but
by stopping you use it code remains more cross-platform compatible
and less likely to cause issues with different compilers etc.

In .NET you cannot cast a boolean to an integer. (Good)
However.... you can send a boolean to a function with an integer
parameter. (Not so good!)  The compiler should stop this really.

_________________________________________________

Looking at wiki entrys C++'s built in True maybe equal to 1
hence the reason why it's now working.   In which case....
you could say it's just the documenation that needs updating?

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #32 on: April 03, 2007, 12:45:32 pm »

Thats Why It Does Not Work!

MC Should Check For False (Not True)

So If Not False (False=0) It Must be True

From VB6 Help

Code: [Select]
When othernumeric types are converted to Boolean values, 0 becomes False and all other values become True. When Boolean values are converted to otherdata types, False becomes 0 and True becomes -1.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #33 on: April 03, 2007, 01:03:47 pm »

A true value is non-zero, a false value is zero.
The constant 'true' is usually -1 (all bits set to 1).
Saying:
int foo = some boolean expression
if(foo)
is okay, it will do the correct thing if foo = 1, 3, -92 or -1.
Saying:
int foo = some boolean expression
if(foo == TRUE)
is incorrect. It will only do the correct thing for foo = 0 or -1.

But, the first thing I looked for was incorrect tests like that. They aren't there...

It's a red herring.

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #34 on: April 03, 2007, 01:29:03 pm »

0003812: 4492: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0003812: 4492: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0003812: 4492: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)

_______________________________________________________

If you wanna try this yourself John and save the trying all the logging stuff
Here's a link to install my script plugin
http://yabb.jriver.com/interact/index.php?topic=38693.msg263180#new
The script I'm using is here
http://yabb.jriver.com/interact/index.php?topic=39660.msg270567#msg270567

Hit the new script button, select VB script,
then paste the code from the above link over the template code
Then hit the run button.


John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #35 on: April 03, 2007, 02:09:45 pm »

Mr ChriZ,
Sorry, I wasn't clear: I need two runs, one with "true" and one with "1"

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #36 on: April 03, 2007, 02:17:16 pm »

Run 1
_____________________________
0011391: 4700: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0011391: 4700: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to 1
0011391: 4700: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)
_____________________________

Run True
_____________________________
0005625: 4700: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0005625: 4700: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0005625: 4700: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #37 on: April 03, 2007, 03:01:16 pm »

There's another version to try.
Use a brand new name for each test (one test is 'true', one test is '-1').
After creating the variable, go to the library field dialog to see if it is correct or not.
Post the log and the result here...

Thanks,

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #38 on: April 03, 2007, 03:20:44 pm »

Is this new new version in the same place as the old new version?

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #39 on: April 03, 2007, 03:26:47 pm »

yes, sorry...

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #40 on: April 03, 2007, 03:41:01 pm »

New version downloaded.
New field typed in.
First test
Using true
Log Says:
______________________________________________________
0006890: 5752: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0006922: 5752: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0006922: 5752: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (32 ms)
______________________________________________________
Field Says Store in Tags not ticked. 

Second Test
Using 1
Log Says
_____________________________________________________
0012531: 5752: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Start
0012531: 5752: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Setting m_bStoreInTags to 1
0012531: 5752: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Finish (0 ms)
_____________________________________________________
Field says Store in Tags Ticked.

3rd Test
Using -1
Log Says
______________________________________________________
0003265: 5752: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0003265: 5752: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0003265: 5752: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)
______________________________________________________
Field Says Store in Tags not ticked. 

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #41 on: April 03, 2007, 04:04:05 pm »

Your log files are not complete. There should be CMJFieldsAutomation::CreateFieldSimple and CDatabaseFieldDlg::CDatabaseFieldDlg lines for each test.

Could you run it again?

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #42 on: April 03, 2007, 04:57:41 pm »

Hi John.
I've just checked the logs, but those aren't in there.
I definitley redownloaded from the link you sent me in the email,
and reinstalled...  :-\

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #43 on: April 03, 2007, 10:18:24 pm »

I'm really confused now. When you call CreateFieldSimple - the logging should be there, and it is, some of the time.

When you view the field dialog box, the logging should be there, and it is some of the time.

Sorry to ask this, but please try again, following the steps very carefully:
1) Clear the log.
2) Create the field
3) View the dialog box
4) View the log.

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #44 on: April 04, 2007, 01:37:28 pm »

Sorry didn't see where you were going with this and done it in the wrong
order originally looking at the log before going to the dialogue.
Test -1
Tick box unticked
_____________________________________________________
0003922: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0003922: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0003922: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)

0008672: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Start
0008672: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Setting m_bStoreInTags to ffffffff
0008672: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Finish (0 ms)

0010563: 1956: SDK: CDatabaseFieldDlg::OnO: Start
0010563: 1956: SDK: CDatabaseFieldDlg::OnO: Setting m_bSavedInTag to 0 (user)
0010625: 1956: SDK: CDatabaseFieldDlg::OnO: Finish (62 ms)

_____________________________________________________


Test 1
Tick Box Ticked
_____________________________________________________
0003844: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0003859: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to 1
0003859: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (15 ms)

0009563: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Start
0009563: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Setting m_bStoreInTags to 1
0009563: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Finish (0 ms)

0011141: 1956: SDK: CDatabaseFieldDlg::OnO: Start
0011141: 1956: SDK: CDatabaseFieldDlg::OnO: Setting m_bSavedInTag to 1 (user)
0011219: 1956: SDK: CDatabaseFieldDlg::OnO: Finish (78 ms)

_____________________________________________________

Test True
Tick box unticked
_____________________________________________________
0005734: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0005734: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0005750: 1956: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (16 ms)

0011125: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Start
0011125: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Setting m_bStoreInTags to ffffffff
0011125: 1956: SDK: CDatabaseFieldDlg::CDatabaseFieldDlg: Finish (0 ms)

0013171: 1956: SDK: CDatabaseFieldDlg::OnO: Start
0013171: 1956: SDK: CDatabaseFieldDlg::OnO: Setting m_bSavedInTag to 0 (user)
0013265: 1956: SDK: CDatabaseFieldDlg::OnO: Finish (94 ms)

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #45 on: April 04, 2007, 03:27:00 pm »

Ok, I think I've fixed it (again!). This time it was a Microsoft function that took a boolean, but expected the boolean to be "1" or "0". It should be in the next build...

j

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #46 on: April 04, 2007, 03:42:27 pm »

This Is How Homer Takes Care of Bugs.

It May Be Painful, But At The End You Get A Reward

Or Do You....

http://www.youtube.com/watch?v=jpyjsFEt0xM
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #47 on: April 04, 2007, 05:20:34 pm »

Version 12.0.206

Nope...

Don't Work Unless You Have A "1" In The BSaveInTag Parm
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #48 on: April 04, 2007, 05:30:34 pm »

Nope sorry still there.  :-\

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Create Field - Source Code For MC12 And VB6 (Sample)
« Reply #49 on: April 04, 2007, 05:35:22 pm »

As I Said It Still Is Not Checked

I Created A Sub That Will Send The Values In This Order, The Sub Fires One Right After Another

1. -1
2. 0
3. 1
4. True
5. False


Like So

Code: [Select]
    MCCreateField.CreateFieldSimple "Test '1' -1: " & MyStrFieldName, "Test '1' -1: " & MyStrDisplayName, MyBAllowEdit, -1
    MCCreateField.CreateFieldSimple "Test '2' 0: " & MyStrFieldName, "Test '2' 0: " & MyStrDisplayName, MyBAllowEdit, 0
    MCCreateField.CreateFieldSimple "Test '3' 1: " & MyStrFieldName, "Test '3' 1: " & MyStrDisplayName, MyBAllowEdit, 1
    MCCreateField.CreateFieldSimple "Test '4' True: " & MyStrFieldName, "Test '4' True: " & MyStrDisplayName, MyBAllowEdit, True
    MCCreateField.CreateFieldSimple "Test '5' False: " & MyStrFieldName, "Test '5' False: " & MyStrDisplayName, MyBAllowEdit, False

The Log

Code: [Select]
Media Center; Version: 12.0.206; Types: 4

0010687: 1200: SDK: CMJPlaybackAutomation::OnFinalRelease: All objects released
0010687: 1200: SDK: CMJPlaybackAutomation::~CMJPlaybackAutomation: Global Count: 0
0010687: 1200: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
0010687: 1200: SDK: CMJCurPlaylistAutomation::OnFinalRelease: All objects released
0010687: 1200: SDK: CMJCurPlaylistAutomation::~CMJCurPlaylistAutomation: Global Count: 0
0011031: 1200: SDK: CMJPlaybackAutomation::CMJPlaybackAutomation: Global Count: 1
0011031: 1200: SDK: CMJPlaybackAutomation::OnFinalRelease: All objects released
0011031: 1200: SDK: CMJPlaybackAutomation::~CMJPlaybackAutomation: Global Count: 0
0011031: 1200: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
0011031: 1200: SDK: CMJCurPlaylistAutomation::OnFinalRelease: All objects released
0011031: 1200: SDK: CMJCurPlaylistAutomation::~CMJCurPlaylistAutomation: Global Count: 0

Sent: -1

0011156: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (16 ms)

Sent: 0

0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to 0
0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)

Sent: 1

0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0011172: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to 1
0011187: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (15 ms)

Sent: True

0011187: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0011187: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to ffffffff
0011187: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (0 ms)

Sent: False

0011187: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Start
0011187: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Setting m_bSavedInTag to 0
0011203: 1200: SDK: CMJFieldsAutomation::CreateFieldSimple: Finish (16 ms)

0011375: 1200: SDK: CMJPlaybackAutomation::CMJPlaybackAutomation: Global Count: 1
0011375: 1200: SDK: CMJPlaybackAutomation::OnFinalRelease: All objects released
0011375: 1200: SDK: CMJPlaybackAutomation::~CMJPlaybackAutomation: Global Count: 0
0011375: 1200: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
0011375: 1200: SDK: CMJCurPlaylistAutomation::OnFinalRelease: All objects released
0011375: 1200: SDK: CMJCurPlaylistAutomation::~CMJCurPlaylistAutomation: Global Count: 0
0011719: 1200: SDK: CMJPlaybackAutomation::CMJPlaybackAutomation: Global Count: 1
0011719: 1200: SDK: CMJPlaybackAutomation::OnFinalRelease: All objects released
0011719: 1200: SDK: CMJPlaybackAutomation::~CMJPlaybackAutomation: Global Count: 0
0011719: 1200: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA
Pages: [1] 2   Go Up