다중 데이터 테이블이 있는 응용 프로그램 및 로컬 데이터 필터를 올바르게 생성하지 않음안녕하세요 여러분, 여러 데이터 테이블을 참조하는 응용 프로그램을 만들려고 하고 해당 응용 프로그램 내에는 각 데이터 테이블의 그래프에 적용되는 데이터 필터가 있습니다. 로컬 데이터 필터를 삽입하면 열 옵션이 정확합니다. 그러나 응용 프로그램을 실행할 때 모든 로컬 데이터 필터는 내가 마지막으로 연 데이터 테이블을 참조합니다. 둘 다 애플리케이션 빌더에서 올바른 데이터 테이블을 참조하고 있다고 말하지만 이는 애플리케이션 실행 중에 어떻게든 변경됩니다.
예를 들어 두 개의 샘플 데이터세트를 사용하는 경우:
JMP App(
Set Name( "Application" ),
Set Description(
"An empty workspace for creating custom applications with one or more windows and scripts"
),
Auto Launch( 1 ),
Snap To Grid( 1 ),
Show Grid( 1 ),
Show Properties( 1 ),
Show Sources( 1 ),
Group By Category( 1 ),
Dashboard Mode( 0 ),
Parameters,
Tables(
DataTable1 = GuiTable(
Set Path( "$SAMPLE_DATA/Body Fat.jmp" ),
Set Label( "Body Fat" ),
Set Location( "Full Path" ),
Set Invisible( 0 )
),
DataTable2 = GuiTable(
Set Path( "$SAMPLE_DATA/Body Measurements.jmp" ),
Set Label( "Body Measurements" ),
Set Location( "Full Path" ),
Set Invisible( 0 )
)
),
Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.
) ),
Allocate(
Module1 = Plan(
PreAllocate,
Script(JSL Quote(// This script is executed when a new module instance is
// created. The pre-defined object "thisModuleInstance" refers
// to the instance object, but other objects such as boxes and
// scripts have not yet been created. Variables declared here are
// scoped to the ModuleInstance namespace.
// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);
thisModuleInstance << Create Objects;
// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").
) ),
Allocate(
List1 = V List Box();
Splitter1 = H Splitter Box();
DataFilter1 = DataTable1 << Data Filter( Local );
Report3 = Platform(
DataTable1,
Bivariate(
Y( :Name( "Height (inches)" ) ),
X( :Name( "Weight (lbs)" ) )
)
);
Splitter2 = H Splitter Box();
DataFilter2 = DataTable2 << Data Filter( Local );
Report2 = Platform(
DataTable2,
Bivariate( Y( :Head ), X( :Mass ) )
);
),
Organize(
Reparent( Splitter2( Report2 ) );
Reparent( Splitter2( DataFilter2 ) );
Reparent( List1( Splitter2 ) );
Reparent( Splitter1( Report3 ) );
Reparent( Splitter1( DataFilter1 ) );
Reparent( List1( Splitter1 ) );
Relocate( List1( 160, 160 ) );
),
Initialize(
List1 << Background Color( 2147483647 );
List1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
List1 << Enabled( 1 );
List1 << Horizontal Alignment( "Default" );
List1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
List1 << Padding( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
List1 << Text Color( 2147483647 );
List1 << Vertical Alignment( "Default" );
List1 << Visibility( "Visible" );
List1 << set horizontal( 0 );
Splitter1 << Background Color( 2147483647 );
Splitter1 << Border(
{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
);
Splitter1 << Enabled( 1 );
Splitter1 << Horizontal Alignment( "Default" );
Splitter1 << Margin(
{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
);
Splitter1 << Padding(
{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
);
Splitter1 << Text Color( 2147483647 );
Splitter1 << Vertical Alignment( "Default" );
Splitter1 << Visibility( "Visible" );
Splitter1 << Dockable( 0 );
Splitter1 << Set Width( 835 );
Splitter1 << Set Height( 497 );
Splitter1 << Set Sizes( {0.5, 0.5} );
Splitter1 << set horizontal( 1 );
Splitter1 << Set Min Size( 835, 497 );
Splitter1 << Set Max Size( 835, 497 );
Splitter1 << Set Auto Stretching( 1, 1 );
Splitter2 << Background Color( 2147483647 );
Splitter2 << Border(
{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
);
Splitter2 << Enabled( 1 );
Splitter2 << Horizontal Alignment( "Default" );
Splitter2 << Margin(
{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
);
Splitter2 << Padding(
{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
);
Splitter2 << Text Color( 2147483647 );
Splitter2 << Vertical Alignment( "Default" );
Splitter2 << Visibility( "Visible" );
Splitter2 << Dockable( 0 );
Splitter2 << Set Width( 648 );
Splitter2 << Set Height( 338 );
Splitter2 << Set Sizes( {0.5, 0.5} );
Splitter2 << set horizontal( 1 );
Splitter2 << Set Min Size( 648, 338 );
Splitter2 << Set Max Size( 648, 338 );
Splitter2 << Set Auto Stretching( 1, 1 );
)
)
),
Initialize(
Module1 << Auto Launch( 1 );
Module1 << Set Module Type( "Report" );
Module1 << Set Window Title( "^TABLENAME - ^APPNAME" );
Module1 << Set Min Size( 0, 0 );
Module1 << Set Max Size( 30000, 30000 );
Module1 << Set Auto Stretching( ., . );
)
) << EditRe: 다중 데이터 테이블이 있는 응용 프로그램 및 로컬 데이터 필터를 올바르게 생성하지 않음이 문제는 JMP 15.2 이상에서 해결될 것임을 확인할 수 있습니다. 응용 프로그램의 여러 로컬 데이터 필터는 적절한 데이터 테이블에 대한 연결을 유지합니다.
Re: 다중 데이터 테이블이 있는 응용 프로그램 및 로컬 데이터 필터를 올바르게 생성하지 않음이것은 효과가 있었다!! 정말 고맙습니다! 해결 방법을 찾는 데 막다른 골목에 있었습니다. 대부분은 애플리케이션을 생성하는 스크립트를 더 이상 볼 수 없다고 생각했기 때문입니다. 내 응용 프로그램이 충분히 커질 때(28개 이상의 로컬 데이터 필터가 있는 60개 이상의 플랫폼과 이 필터를 모두 포함하는 표시 요소) "스크립트 저장" 옵션이 내 응용 프로그램의 사용자 지정 스크립트 부분을 제공하는 것처럼 보였습니다. Allocate 기능을 모두 한 줄에 넣은 것으로 나타났습니다. 내가 스크립트 재포맷을 눌렀을 때 수백 줄의 추가 줄이 드러났습니다. 이것은 반드시 버그는 아니지만 알고 싶어할 것이라고 생각했습니다.
내가 단계를 따랐을 때 모든 것이 제대로 작동하고 있다고 제안했습니다. 필터를 수정하기 위해 스크립트로 돌아가기 전에 전체 응용 프로그램을 만들어야 하므로 향후 반복에서 이 문제가 해결되기를 바랍니다.
Re: 다중 데이터 테이블이 있는 응용 프로그램 및 로컬 데이터 필터를 올바르게 생성하지 않음안녕하세요 카메론님, 답변 감사합니다. 그것이 실제로 내가 원래 가지고 있던 방식이지만 자체적으로 문제가 발생합니다. 응용 프로그램의 다른 곳에 이 필터에 적용할 스크립트 설정이 있습니다(이 중 실제 응용 프로그램에는 12개가 넘습니다). 플랫폼의 일부로 포함되었을 때 스크립팅으로 필터에 액세스하는 방법을 알 수 없었습니다. 기본적으로 내 플랫폼에 대한 명령을 스크립트로 작성하는 방법을 알 수 없었고 해당 플랫폼에 대한 표시 항목만 있었습니다. 이것은 별개의 문제이지만, 이 문제를 해결하는 방법을 알고 있다면 그것도 도움이 될 것입니다!
Re: 다중 데이터 테이블이 있는 응용 프로그램 및 로컬 데이터 필터를 올바르게 생성하지 않음안녕하십니까,
나는 당신이보고있는 것을 복제 할 수 있습니다. 이것은 해결 방법일 뿐이지만 다음을 시도하십시오.
1. 제공한 스크립트에서. 맨 마지막 줄을 편집이 아닌 실행으로 변경하고 스크립트를 실행해 보십시오. 내 손에, 당신의 스크립트는 내가 기대하는 것을 수행합니다.
2. 애플리케이션을 빌드할 때 데이터 테이블의 위치를 현재 데이터 테이블이 아닌 이름으로 변경합니다.
Tables(
DataTable1 = GuiTable(
Set Path( "$SAMPLE_DATA/Body Fat.jmp" ),
Set Label( "Body Fat" ),
Set Location( "name" ),
Set Invisible( 0 )
),
DataTable2 = GuiTable(
Set Path( "$SAMPLE_DATA/Body Measurements.jmp" ),
Set Label( "Body Measurements" ),
Set Location( "name" ),
Set Invisible( 0 )
)
),
위치 옵션은 맨 아래에 있습니다.
때때로 "할당" 포인터가 예상과 다릅니다. 따라서 스크립트에서 필터 1이 테이블 1을 가리키고 필터 2가 테이블 2를 가리키는지 다시 확인하십시오.
Allocate(
List1 = V List Box();
Splitter1 = H Splitter Box();
DataFilter1 = DataTable1 << Data Filter( Local );
Report3 = Platform(
DataTable1,
Bivariate(
Y( :Name( "Height (inches)" ) ),
X( :Name( "Weight (lbs)" ) )
)
);Re: 다중 데이터 테이블이 있는 응용 프로그램 및 로컬 데이터 필터를 올바르게 생성하지 않음안녕 @DopeAgonist ,
이것은 꽤 이상한 동작이며 아마도 개발자의 관심을 받을 만합니다.처음부터 응용 프로그램을 빌드하고 스크립트의 로컬 데이터 필터 연결을 올바른 테이블로 변경하는 방법을 설명했습니다.다음을 사용하여 스크립트에 수동으로 추가하여 적절한 데이터 필터를 표시할 수 있었습니다.
Splitter1 << Prepend(DataTable1 << Data Filter("Local"));
Splitter2 << Prepend(DataTable2 << Data Filter("Local"));그러나 이것은 여전히 작동하지 않습니다.어떤 방법을 사용하든 로컬 데이터 필터는 어떤 이유로 테이블에 제대로 연결되지 않습니다.필터 값을 변경해도 테이블의 행 선택에는 영향을 미치지 않습니다.
애플리케이션으로 가져오는 분석 플랫폼에서 데이터 필터를 생성하면 필터가 작동합니다.예를 들어:
JMP App(
Set Name( "Application" ),
Set Description(
"An empty workspace for creating custom applications with one or more windows and scripts"
),
Auto Launch( 1 ),
Snap To Grid( 1 ),
Show Grid( 1 ),
Show Properties( 1 ),
Show Sources( 1 ),
Group By Category( 1 ),
Dashboard Mode( 0 ),
Parameters,
Tables(
DataTable1 = GuiTable(
Set Path( "$SAMPLE_DATA/Body Fat.jmp" ),
Set Label( "Body Fat" ),
Set Location( "Full Path" ),
Set Invisible( 1 )
),
DataTable2 = GuiTable(
Set Path( "$SAMPLE_DATA/Body Measurements.jmp" ),
Set Label( "Body Measurements" ),
Set Location( "Full Path" ),
Set Invisible( 1 )
)
),
Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.
) ),
Allocate(
Module1 = Plan(
PreAllocate,
Script(JSL Quote(// This script is executed when a new module instance is
// created. The pre-defined object "thisModuleInstance" refers
// to the instance object, but other objects such as boxes and
// scripts have not yet been created. Variables declared here are
// scoped to the ModuleInstance namespace.
// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);
thisModuleInstance << Create Objects;
// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").
) ),
Allocate(
Report2 = Platform(
DataTable2,
Bivariate(
Y( :Head ),
X( :Mass ),
Automatic Recalc( 1 ),
Local Data Filter
)
);
Report1 = Platform(
DataTable1,
Bivariate(
Y( :Name( "Height (inches)" ) ),
X( :Name( "Weight (lbs)" ) ),
Automatic Recalc( 1 ),
Local Data Filter
)
);
),
Organize(
Relocate( Report1( 0, 0 ) );
Relocate( Report2( 10, 680 ) );
),
Initialize( Glue() )
)
),
Initialize(
Module1 << Auto Launch( 1 );
Module1 << Set Module Type( "Report" );
Module1 << Set Window Title( "^TABLENAME - ^APPNAME" );
Module1 << Set Min Size( 0, 0 );
Module1 << Set Max Size( 30000, 30000 );
Module1 << Set Auto Stretching( ., . );
)
) << Edit이것이 당신이 가진 것과 정확히 같지는 않지만 아마도 당신을 위해 충분히 잘 작동할 것입니다.